--- nono/exp/optestxp/Makefile 2026/04/29 17:05:16 1.1 +++ nono/exp/optestxp/Makefile 2026/04/29 17:05:20 1.1.1.2 @@ -5,10 +5,14 @@ # TOPDIR= ../.. +.include "${TOPDIR}/Makefile.cfg" + CXXFLAGS= \ -I${TOPDIR} \ -I${TOPDIR}/lib \ +all: optest.com daatest.com + optest.com: optest.z80 perl ${TOPDIR}/util/runcom/z80tocom.pl $> $@ @@ -23,12 +27,37 @@ gen.asm: optestxp_gen -rm -f $@ ./optestxp_gen > $@ -optestxp_gen: optestxp_gen.o ${TOPDIR}/lib/libnnlib.a - ${CXX} ${LDFLAGS} -o $@ $> +optestxp_gen: optestxp_gen.o optestxp_subr.o ${TOPDIR}/lib/libnnlib.a + ${CXX} ${LDFLAGS} -o $@ $> ${LIBS} optestxp_gen.o: optestxp_gen.cpp ${CXX} ${CXXFLAGS} -c $> +optestxp_subr.o: optestxp_subr.cpp + ${CXX} ${CXXFLAGS} -c $> + + +daatest.com: daatest.z80 + perl ${TOPDIR}/util/runcom/z80tocom.pl $> $@ + +daatest.z80: daatest.asm + z80-asm $> 0100:$@ + +daatest.asm: gendaa.asm subr.asm + -rm -f $@ + cat $> > $@ + +gendaa.asm: daatest_gen + -rm -f $@ + ./daatest_gen > $@ + +daatest_gen: daatest_gen.o optestxp_subr.o ${TOPDIR}/lib/libnnlib.a + ${CXX} ${LDFLAGS} -o $@ $> ${LIBS} + +daatest_gen.o: daatest_gen.cpp + ${CXX} ${CXXFLAGS} -c $> + .PHONY: clean clean: - rm -f optest.z80 optest.asm gen.asm optestxp_gen *.o + rm -f optest.z80 optest.asm gen.asm daatest.z80 daatest.asm gendaa.asm + rm -f optestxp_gen daatest_gen *.o