diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-14 03:30:52 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-14 03:30:52 +0100 |
| commit | 03fb41e835ff4d10325351c1460e9445e4b572ca (patch) | |
| tree | f9438c664583e5a1be5339fb5cbfc9bcc1895453 /Makefile | |
| parent | 51c9f5abe06571845191b31f7442370ccb26f83a (diff) | |
improving build system
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 40 |
1 files changed, 15 insertions, 25 deletions
@@ -48,42 +48,30 @@ DEPS=$(patsubst %.c, %.d, $(SOURCES)) ASMOBJECTS=$(patsubst %.asm, %.o, $(ASMSOURCES)) KERNEL_ENTRY=./boot/kernel_entry.o -#master boot record asm +############ final image (default target) ############ +all: FoolOS.vdi +new: clean all +newrun: clean run + +include Makefile.common +-include $(DEPS) +#master boot record MBR=./boot0/mbr.bin +$(MBR): + make -C boot0 #stage 2 bootloader STAGE2=./boot/stage2.bin +$(STAGE2): + make -C boot #multiprocessor binary entry MP_BIN=./boot/mp.bin - #some fillup data (zeros) FILLUP=./data/fill.bin - -############ final image (default target) ############ -all: FoolOS.vdi -new: clean all -newrun: clean run - -############ nasm assembling rules ############ - -%.o: %.asm - nasm -f elf $^ -o $@ - -%.bin: %.asm - nasm -f bin $^ -o $@ - -%.o: %.c - $(CC) -c $(CFLAGS) $*.c -o $*.o - $(CC) -MM -MT $*.o $(CFLAGS) $*.c > $*.d - - -# include dependancies of our object files --include $(DEPS) - ############ linking kernel binary ############ @@ -93,7 +81,6 @@ kernel.bin: $(KERNEL_ENTRY) $(ASMOBJECTS) $(OBJECTS) ############ fool-font ############ - binfont.bin: data/binfont.src python tools/binarize.py $< $@ @@ -140,6 +127,8 @@ stick: FoolOS.img clean_release: -rm *.bin FoolData.img binfont.img bochs.log $(KERNEL_ENTRY) $(ASMOBJECTS) $(OBJECTS) $(FILLUP) $(MBR) $(MP_BIN) bochs.out ne2k-tx.log ne2k-txdump.txt $(STAGE2) $(DEPS) make -C userspace clean + make -C boot0 clean + make -C boot clean clean: clean_release -rm FoolOS.img FoolOS.vdi @@ -148,6 +137,7 @@ release: new -mv FoolOS.img release/ make clean_release +####### userspace ######### userspace/ext2.img: make -C userspace |
