metalsvm/tools/Makefile
stefan 9a9df5ed2e - merge current eduOS branch to MetalSVM
=> add the support of "real" user-space applications, which could be loaded via initrd


git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@394 315a16e6-25f9-4109-90ae-ca3045a26c18
2011-02-08 18:37:56 +00:00

50 lines
1,015 B
Makefile

MAKE = make
CC = gcc
CROSS_COMPILE=i386-unknown-linux-gnu-gcc
CFLAGS = -m32 -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)
smp_setup.bin: smp_setup.asm
$(ASM) $(ASMFLAGS) -o $@ $<
smp_setup.hex: smp_setup.bin
hexdump -v -e '"0x" 1/1 "%02X" ", "' $< > $@
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 ./metalsvm.elf
objcopy -O binary metalsvm.elf 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 *.hex *.elf obj
depend:
$(CC) -MM $(CFLAGS) *.c > Makefile.dep
-include Makefile.dep
# DO NOT DELETE