|
|
1.1 root 1: # Makefile to build the Atari test program and other required files
2: # for the TOS tester and to run it with minimal or fairly full
3: # set of options.
4:
5: # default target is 'test', everything else gets build as its deps
6: all: test
7:
8: # targets without corresponding file
9: .PHONY: clean test test-all
10:
11:
12: # tos/ subdir should be either symlink to where you have your TOS
13: # images, or real directory with symlinks to TOS images you want
14: # to test with this. Or TOSDIR variable needs to point where they are:
15: # TOSDIR=/path/to/toses/ make
16:
17: TOSDIR ?= tos
18:
19: # TOSDIR should contain at least this!
20: BUILD_TOS = $(TOSDIR)/etos512k.img
21:
22: # Hatari machine config for AHCC build
23: BUILD_CONFIG = -m --machine tt --tos $(BUILD_TOS)
24:
25: # where the code & test programs are
26: DIR = disk
27:
28: # AHCC related files expected for building by disk/ahcc-* hconsole scripts
1.1.1.2 ! root 29: AHCC_FILES = $(DIR)/ahcc_p.ttp $(DIR)/include $(DIR)/lib
! 30: BUILD_TOOLS = $(AHCC_FILES) $(BUILD_TOS)
1.1 root 31:
1.1.1.2 ! root 32: .PHONY: toolcheck
1.1 root 33:
34:
1.1.1.2 ! root 35: # Building test programs requires:
1.1 root 36: # - EmuTOS, AHCC and installed Hatari
1.1.1.2 ! root 37: #
1.1 root 38: # before running make:
39: # - symlink etos512k.img and ahcc_p.ttp + its include & lib dirs
40: # under $(DIR)/ subdir
1.1.1.2 ! root 41: #
! 42: # -> otherwise toolcheck fails
! 43:
! 44: toolcheck:
! 45: @which hatari
! 46: @for i in $(BUILD_TOOLS); do \
! 47: if [ \! -e $$i ]; then \
! 48: echo "ERROR: required re-build file '$$i' missing!"; \
! 49: false; \
! 50: fi; \
! 51: done
! 52:
! 53:
! 54: # build the full and minimal GEMDOS emu testers.
! 55:
! 56:
! 57: GEMDOS_TEST = $(DIR)/GEMDOS.PRG
! 58: GEMDOS_SCRIPT = $(DIR)/ahcc-gemdos
! 59: GEMDOS_DEP = $(DIR)/gemdos.c $(DIR)/common.c $(DIR)/gemdos.prj toolcheck
! 60:
! 61: # build the full GEMDOS tester
1.1 root 62: $(GEMDOS_TEST): $(GEMDOS_DEP)
63: $(RM) $(DIR)/*.O $(DIR)/*.MAP $(DIR)/*.tmp
64: ../../tools/hconsole/hconsole.py $(GEMDOS_SCRIPT) -- $(BUILD_CONFIG) $(DIR)
65: [ -f $(DIR)/GEMDOS.O ] && [ \! -f $(DIR)/ldfile.tmp ] # verify compiling & linking succeeded
66:
67:
68: MINIMAL_TEST = $(DIR)/MINIMAL.PRG
69: MINIMAL_SCRIPT = $(DIR)/ahcc-minimal
1.1.1.2 ! root 70: MINIMAL_DEP = $(DIR)/minimal.c $(DIR)/common.c $(DIR)/minimal.prj toolcheck
1.1 root 71:
1.1.1.2 ! root 72: # build the minimal GEMDOS tester
1.1 root 73: $(MINIMAL_TEST): $(MINIMAL_DEP)
74: $(RM) $(DIR)/*.O $(DIR)/*.MAP $(DIR)/*.tmp
75: ../../tools/hconsole/hconsole.py $(MINIMAL_SCRIPT) -- $(BUILD_CONFIG) $(DIR)
76: [ -f $(DIR)/MINIMAL.O ] && [ \! -f $(DIR)/ldfile.tmp ] # verify compiling & linking succeeded
77:
78:
79: clean:
80: $(RM) $(DIR)/*.O $(DIR)/*.MAP $(DIR)/*.tmp
81:
82:
83: # create blank DD floppy image
84: blank-a.st.gz:
85: dd if=/dev/zero of=blank-a.st bs=1024 count=720
86: mformat -a -t 80 -h 2 -n 9 -i blank-a.st ::
87: gzip blank-a.st
88:
89:
90: # create 360KB (single side) test floppy that autoruns test program using *.INF file.
91: # requires:
92: # - mformat & mcopy from mtools
93: bootdesk.st.gz: $(MINIMAL_TEST) $(DIR)/TEXT floppy/*.INF
94: dd if=/dev/zero of=bootdesk.st bs=1024 count=360
95: mformat -a -t 80 -h 1 -n 9 -i bootdesk.st ::
96: MTOOLS_NO_VFAT=1 mcopy -i bootdesk.st -spmv $+ ::
97: $(RM) $@
98: gzip bootdesk.st
99:
100: # create 360KB (single side) test floppy that autoruns test program from auto/
101: # as very old TOS versions don't like the *.INF file autorun feature.
102: # requires:
103: # - mformat, mcopy & mmd from mtools
104: bootauto.st.gz: $(MINIMAL_TEST) $(DIR)/TEXT
105: dd if=/dev/zero of=bootauto.st bs=1024 count=360
106: mformat -a -t 80 -h 1 -n 9 -i bootauto.st ::
107: MTOOLS_NO_VFAT=1 mmd -i bootauto.st ::AUTO
108: MTOOLS_NO_VFAT=1 mcopy -i bootauto.st -pmv $(DIR)/TEXT ::
109: MTOOLS_NO_VFAT=1 mcopy -i bootauto.st -pmv $(MINIMAL_TEST) ::AUTO
110: $(RM) $@
111: gzip bootauto.st
112:
113:
114: # optional 16MB HD image for EmuTOS/ACSI testing without HD drivers
115: # converts floppy desktop infos for HD (A: -> C:)
116: hd.img: $(MINIMAL_TEST) $(DIR)/TEXT floppy/*.INF
117: mkdir tmp
118: cp -a $(MINIMAL_TEST) $(DIR)/TEXT tmp/
119: for i in floppy/*.INF; do sed -e 's/A:/C:/g' < $$i > tmp/$${i##*/}; done
120: ../../tools/atari-hd-image.sh 16 $@ LABEL tmp
121: $(RM) -r tmp
122:
123:
124: # requires:
125: # - Building of floppies & GEMDOS_TEST to have succeeded
126: # - Latest Hatari to be installed, or to run this with something like:
127: # PATH=../../build/src:$PATH make
128: test: blank-a.st.gz bootauto.st.gz bootdesk.st.gz $(GEMDOS_TEST)
129: ./tos_tester.py --disks floppy,gemdos --graphics mono --memsizes 4 --machines ste $(BUILD_TOS)
130:
131: # run all default tests
132: test-full: blank-a.st.gz bootauto.st.gz bootdesk.st.gz
133: ./tos_tester.py $(TOSDIR)/*.img
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.