PROG = *** Name of addin here *** EMU = ../../Emulator BIN = ../../bin export ZCCCFG = ../../lib/config/ export Z80_OZFILES = ../../lib/ export Z80_STDLIB = ../../lib/clibs/rex_clib.lib export TEMP = ../tmp # For testing, specify -no-cleanup to keep temporary files #ZCCFLAGS = -no-cleanup OBJECTS = $(PROG).o MV = /bin/mv -vf CP = /bin/cp -vf RM = /bin/rm -vf # Rule for compiling Z80 C files ... %.o : %.c $(BIN)/zcc +rex -c $(ZCCFLAGS) $< # Rule for compiling Z80 ASM files... %.o : %.asm $(BIN)/zcc +rex -c $(ZCCFLAGS) $< all: install addin1.out $(PROG).rex clean: $(RM) $(OBJECTS) addin1.out $(PROG).rex $(PROG).bin zcc_opt.def $(PROG).map install: addin1.out $(CP) addin1.out $(EMU)/addin1.out addin1.out: $(PROG).rex $(BIN)/rex2emu $(PROG).rex addin1.out $(PROG).rex: $(PROG).bin $(PROG).txt $(PROG).bmp $(BIN)/makeaddin $(PROG) $(MV) $(PROG).ds2 $(PROG).rex $(PROG).bin: $(OBJECTS) $(BIN)/zcc +rex -create-app -m -lgrclib -o$(PROG).bin $(OBJECTS) # BUILD_INFO needs to be explicitly mentioned as a prerequisite for any # object which uses the build info otherwise it will not be updated $(PROG).o: BUILD_INFO # Always update the build information # Note this target cannot be build_info.h or else it will never get rebuilt as it has no prerequisites BUILD_INFO: ../build_info