@xahmol: And to take your Makefile to a whole new level here is a small kick-start how to run your compiled project in Oricutron with auto-load of symbols and break-points for debugging:
Code: Select all
# # # Name your project
PROJECT := LUDO
PROJECT_DIR := $(shell pwd)
# # # Project targets
TAP := BUILD/$(PROJECT).tap
DSK := BUILD/$(PROJECT).dsk
# # # Edit to point to your Oricutron directory
EMUL_DIR := ~/where/is/Oricutron
# # # Use MACH to override the default and run as:
# # # make run-tap MACH=-ma for Atmos (default)
# # # make run-tap MACH=-m1 for Oric-1
# # # make run-tap MACH=-mo16k for Oric-1 / 16K
# # # make run-tap MACH=-mp for Pravetz-8D
# # # make run-tap MACH=-mt for Telestrat
MACH := -ma
# # #
EMU := ./oricutron
EMUDIR := $(EMUL_DIR)
EMUARG := $(MACH)
# # # (un)comment, add, remove more Oricutron cmd-line options
EMUARG += --serial none
EMUARG += --vsynchack off
EMUARG += --turbotape on
# append symbols and breakpoints
# read more at DF-forum:
# https://forum.defence-force.org/viewtopic.php?p=15145#p15145
EMUARG += -s $(PROJECT_DIR)/$(PROJECT).sym
EMUARG += -r :$(PROJECT_DIR)/$(PROJECT).brk
# # #
.PHONY: run-tap run-dsk
# # # Run with produced TAP file
run-tap: $(TAP)
@([ -e $(PROJECT).brk ] || touch $(PROJECT).brk) || echo -n
@cd $(EMUDIR) && $(EMU) $(EMUARG) $(PROJECT_DIR)/$<
# # # Run with produced DSK file
run-dsk: $(DSK)
@([ -e $(PROJECT).brk ] || touch $(PROJECT).brk) || echo -n
@cd $(EMUDIR) && $(EMU) $(EMUARG) $(PROJECT_DIR)/$<
This is just a snipped but you will figure out what to do with it .