Newer
Older
Scratch / lockwasher / src / sys / compile / Makefile
# $Id: Makefile,v 1.10 2003/05/04 13:20:15 reddawg Exp $
# Kernel Makefile (C) 2002 The UbixOS Project

CFLAGS = -fno-builtin

#Compiler
GCC = gcc 
G++ = gcc

#Linker
LD = ld

#Kernel File Name
KERNEL = ubix.elf

#Delete Program
REMOVE = rm -f

#Objects
OBJS = null.o

# Link the kernel statically with fixed text+data address @1M
$(KERNEL) : $(OBJS)
	$(LD) -nobuiltin -o $@ $(OBJS) ../init/*.o ../kernel/*.o ../isa/*.o ../pci/*.o ../sys/*.o ../vmm/*.o ../ubixfs/*.o ../devfs/*.o ../lib/*.o ../sde/*.o ../graphics/*.o ../ld/*.o -Ttext 0x30000
	/usr/bin/strip $@

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