Newer
Older
ubixos / src / bin / init / Makefile
# $Id$
# Kernel Makefile (C) 2002 The UbixOS Project


#Compiler
GCC = gcc 
G++ = gcc

#Linker
LD = ld

#Kernel File Name
BINARY = init

#Delete Program
REMOVE = rm -f

#Objects
OBJS = main.o

# Link the kernel statically with fixed text+data address @1M
$(BINARY) : $(OBJS)
	$(LD) -o $@ ../../lib/libc/stdio/*.o ../../lib/libc/stdlib/*.o ../../lib/libc/sys/*.o $(OBJS)

# Compile the source files
.cc.o:
	$(G++)  -Wall -fomit-frame-pointer -O -I../../lib/libc/include -c -o $@ $<
 
.cc.s:
	$(G++)  -Wall -fomit-frame-pointer -O -I../../lib/libc/include -S -o $@ $<
 
.c.o:
	$(GCC)  -Wall -O -I../../lib/libc/include -c -o $@ $<
 
.c.s:
	$(GCC)  -Wall -fomit-frame-pointer -O -I../../lib/libc/include -S -o $@ $<
 
.S.o:
	$(GCC)  -Wall -fomit-frame-pointer -c -o $@ $<
 
# Clean up the junk
clean:
	$(REMOVE) $(OBJS) $(BINARY)