Newer
Older
Scratch / tmpers / src / sys / compile / Makefile
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 889 bytes Scratch
# $Id: Makefile,v 1.5 2002/11/04 04:27:49 reddawg Exp $
# Kernel Makefile (C) 2002 The UbixOS Project


#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)  -o $@ $(OBJS) ../init/*.o ../kernel/*.o ../lib/*.o ../drivers/*.o ../vmm/*.o ../ubixfs/*.o ../urm/*.o -Ttext 0x30000
	/usr/bin/strip $@

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