Added build directory

This commit is contained in:
Karim Vergnes 2017-04-12 15:22:35 +02:00
parent 66762c4a34
commit 3fd115a090

View file

@ -4,30 +4,34 @@ MUSIC = Data/Song/nyan.mid
all: disk.img
image.bin: $(IMAGES)
build/image.bin: $(IMAGES)
python2 Data/Image/png2bin.py `echo $(IMAGES) | sort -h` $@
song.bin: $(MUSIC)
build/song.bin: $(MUSIC)
python2 Data/Song/midi2bin.py $< $@
data.o: song.bin image.bin
cat image.bin song.bin Data/Other/message.txt > data.o
build/data.o: build/song.bin build/image.bin
cat build/image.bin build/song.bin Data/Other/message.txt > build/data.o
Data/compressed.bin: data.o Data/Compressor/compress.c
Data/compressed.bin: build/data.o Data/Compressor/compress.c
cc Data/Compressor/compress.c -o Data/Compressor/compress
Data/Compressor/compress data.o Data/compressed.bin
Data/Compressor/compress build/data.o Data/compressed.bin
#comp.o: decompress.asm
# nasm decompress.asm -o comp.o -f aout
kernel.o: kernel.asm decompress.asm Data/compressed.bin
nasm kernel.asm -o kernel.o -f aout
build/kernel.o: kernel.asm decompress.asm Data/compressed.bin
nasm kernel.asm -o build/kernel.o -f aout
disk.img: kernel.o linker.ld Data/compressed.bin
ld -o disk.img -T linker.ld kernel.o -m elf_i386
disk.img: build/kernel.o linker.ld Data/compressed.bin
ld -o disk.img -T linker.ld build/kernel.o -m elf_i386
test: disk.img
qemu-system-i386 -s -soundhw pcspk -fda disk.img
clean:
rm build/* Data/Compressor/compress Data/compressed.bin
.PHONY: test all