struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / ports / rrz80 / spec.mk
blobd4c887cc8344eb39ce185ac615a1dd6ee8980bfb
1 # Regression test specification for the z80 target running on top of the Java based
2 # 'ConsoleZ80' emulator.
4 EMU = $(SDCC_EXTRA_DIR)/emu/rrz80/rrz80$(EXEEXT)
5 MAKEBIN = $(top_builddir)/bin/makebin$(EXEEXT)
7 SDCCFLAGS += --nostdinc -I$(top_srcdir)
8 LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/z80
10 SDCCFLAGS += -mz80 --less-pedantic
11 LINKFLAGS += --out-fmt-ihx z80.lib
13 OBJEXT = .rel
14 BINEXT = .bin
16 # otherwise `make` deletes testfwk.rel and `make -j` will fail
17 .PRECIOUS: $(PORT_CASES_DIR)/%$(OBJEXT)
19 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
20 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
21 include $(srcdir)/fwk/lib/spec.mk
23 # Rule to generate a Emulator .bin file from the .ihx linker output.
24 %$(BINEXT): %.ihx
25 $(MAKEBIN) -s 32768 < $< > $@
27 # Rule to link into .ihx
28 %.ihx: %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
29 $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
31 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
32 @# TODO: sdas should place it\'s output in the current dir
33 cp $< $(PORT_CASES_DIR)
34 $(top_builddir)/bin/sdasz80 -plosgff $(PORT_CASES_DIR)/$(notdir $<)
35 rm $(PORT_CASES_DIR)/$(notdir $<)
37 %$(OBJEXT): %.s
38 $(top_builddir)/bin/sdasz80 -plosgff $<
40 %$(OBJEXT): %.c
41 $(SDCC) $(SDCCFLAGS) -c $< -o $@
43 $(PORT_CASES_DIR)/%$(OBJEXT): $(srcdir)/fwk/lib/%.c
44 $(SDCC) $(SDCCFLAGS) -c $< -o $@
46 $(PORT_CASES_DIR)/fwk.lib: $(srcdir)/fwk/lib/fwk.lib
47 cat < $(srcdir)/fwk/lib/fwk.lib > $@
49 # PENDING: Path to sdcc-extra
50 %.out: %$(BINEXT)
51 mkdir -p $(dir $@)
52 $(EMU) --maxruntime=3 --mapfile=$(<:.bin=.sym) $< > $@
53 -grep -n FAIL $@ /dev/null || true
55 _clean: