# $Id$
# Application Makefile (C) 2002-2004 The UbixOS Project

# Include Global 'Source' Options
include ../../Makefile.inc
include ../Makefile.inc

#Compiler Flags
CFLAGS = -I../../include -I../../lib/libc/include -fno-builtin

#Linker
LD = ld

#Binary File Name
BINARY = disklabel 

#Delete Program
REMOVE = rm -f

#Objects
OBJS = main.o

#Startup File
STARTUP = ../../lib/ubix/startup.o

# Link The Binary
$(BINARY) : $(OBJS)
	$(CC) -nostdlib -o $@ $(STARTUP) $(LIBRARIES) $(OBJS)

# Compile the source files
.cc.o:
	$(CXX)  -Wall -fomit-frame-pointer -O $(CFLAGS) -c -o $@ $<
 
.cc.s:
	$(CXX)  -Wall -fomit-frame-pointer -O $(CFLAGS) -S -o $@ $<
 
.c.o:
	$(CC)  -Wall -O $(CFLAGS) -c -o $@ $<
 
.c.s:
	$(CC)  -Wall -fomit-frame-pointer -O $(CFLAGS) -S -o $@ $<
 
.S.o:
	$(CC)  -Wall -fomit-frame-pointer -c -o $@ $<
 
# Clean Up The junk
clean:
	$(REMOVE) $(OBJS) $(BINARY)
