65X-DOS/Makefile

37 lines
739 B
Makefile

include config/config.mk
TARGET := sentinel-65x-512K
.PHONY: all
all: build/$(TARGET).bin
include config/boot.mk
include config/kernel.mk
build/$(TARGET).bin: build/boot.bin build/kernel.bin
#Create an empty .bin file.
@dd if=/dev/zero of=$@ bs=1024 count=512
# Add the boot module at offset 0x008000
@dd if=build/boot.bin of=$@ bs=1024 seek=32 conv=notrunc
# Add the bios module at offset 0x008300
@dd if=build/kernel.bin of=$@ bs=1 seek=33536 conv=notrunc
.PHONY: clean
clean:
@find build -type f \( \
-name '*.pgz' -o \
-name '*.bin' -o \
-name '*.elf' -o \
-name '*.a' -o \
-name '*.lst' \
\) -delete
@find src -type f \( \
-name '*.o' \
\) -delete
.PHONY: flash
flash: $(TARGET).bin
$(MP) $(MPFLAGS) -w $<