
git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@143 315a16e6-25f9-4109-90ae-ca3045a26c18
43 lines
805 B
Makefile
43 lines
805 B
Makefile
MAKE = make
|
|
CC = gcc
|
|
CROSS_COMPILE=i386-unknown-linux-gnu-gcc
|
|
CFLAGS = -O2 -Wall
|
|
LDFLGAS =
|
|
DEFINES=
|
|
ASM = nasm
|
|
ASMFLAGS = -fbin
|
|
|
|
# other implicit rules
|
|
%.o : %.c
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
default:
|
|
$(MAKE) all
|
|
|
|
all:
|
|
$(MAKE) make_initrd
|
|
|
|
make_initrd: make_initrd.o
|
|
$(CC) $(CFLAGS) -o make_initrd $< $(LDFLAGS)
|
|
|
|
scc_setup.bin: scc_setup.asm
|
|
$(ASM) $(ASMFLAGS) -o $@ $<
|
|
|
|
reset_vector.bin: reset_vector.o
|
|
ld --oformat binary -Ttext 0 -melf_i386 -o $@ $<
|
|
|
|
SCC: scc_setup.bin reset_vector.bin
|
|
cp ../metalsvm.bin .
|
|
chmod a-x *.bin
|
|
. ./prepare.sh
|
|
/home/lankes/tools/bin2obj -m load.map -o metalsvm.obj
|
|
sccMerge -noimage -m 8 -n 12 -force ./metalsvm.mt
|
|
|
|
clean:
|
|
$(RM) -rf *.o *~ make_initrd *.bin *.obj obj
|
|
|
|
depend:
|
|
$(CC) -MM $(CFLAGS) *.c > Makefile.dep
|
|
|
|
-include Makefile.dep
|
|
# DO NOT DELETE
|