2015-11-02 22:04:46 +00:00
|
|
|
.PHONY: all clean test
|
2015-07-12 14:40:52 +00:00
|
|
|
|
2018-02-23 21:06:49 +00:00
|
|
|
# Size of cartridge to generate.
|
|
|
|
# Possible values:
|
|
|
|
# 8K = 0x2000
|
|
|
|
# 16K = 0x4000
|
|
|
|
# 32K = 0x8000
|
|
|
|
CARTSIZE := 0x2000
|
|
|
|
|
|
|
|
ifeq (${CARTSIZE},0x8000)
|
|
|
|
COUNT := 3
|
|
|
|
else
|
|
|
|
COUNT := 1
|
|
|
|
endif
|
|
|
|
|
2015-07-12 14:40:52 +00:00
|
|
|
all: conio.pce
|
|
|
|
|
2018-02-23 21:06:49 +00:00
|
|
|
%.pce: %.bin
|
|
|
|
dd if=$< bs=8K skip=${COUNT} > $@
|
|
|
|
dd if=$< bs=8K count=${COUNT} >> $@
|
|
|
|
|
|
|
|
%.bin: %.c ../../../lib/pce.lib
|
|
|
|
../../../bin/cl65 -t pce $< -Wl -D__CARTSIZE__=${CARTSIZE} -m $*.map -o $@
|
2015-07-12 14:40:52 +00:00
|
|
|
|
|
|
|
clean:
|
2018-02-23 21:06:49 +00:00
|
|
|
$(RM) conio.o conio.???
|
2015-07-12 14:40:52 +00:00
|
|
|
|
|
|
|
test: conio.pce
|
2018-02-23 21:06:49 +00:00
|
|
|
mednafen -force_module pce $<
|