struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / ports / rrgbz80 / spec.mk
blob05cc3df3360cc20394f2ff735b37981fd7995e63
1 # Regression test specification for the gbz80 target.
3 EMU = $(SDCC_EXTRA_DIR)/emu/rrgb/rrgb$(EXEEXT)
4 MAKEBIN = $(top_builddir)/bin/makebin$(EXEEXT)
6 SDCCFLAGS += --nostdinc -I$(top_srcdir)
7 LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/gbz80
9 SDCCFLAGS += -mgbz80 --less-pedantic
10 LINKFLAGS += --out-fmt-ihx gbz80.lib
12 OBJEXT = .rel
13 BINEXT = .gb
15 # otherwise `make` deletes testfwk.rel and `make -j` will fail
16 .PRECIOUS: $(PORT_CASES_DIR)/%$(OBJEXT)
18 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
19 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
20 include $(srcdir)/fwk/lib/spec.mk
22 # Rule to convert .ihx to .gb
23 %$(BINEXT): %.ihx
24 $(MAKEBIN) -Z -yn ABS $< $@
26 # Rule to link into .ihx
27 %.ihx: %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
28 $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
30 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
31 @# TODO: sdas should place it\'s output in the current dir
32 cp $< $(PORT_CASES_DIR)
33 $(top_builddir)/bin/sdasgb -plosgff $(PORT_CASES_DIR)/$(notdir $<)
34 rm $(PORT_CASES_DIR)/$(notdir $<)
36 %$(OBJEXT): %.c
37 $(SDCC) $(SDCCFLAGS) -c $< -o $@
39 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
40 $(SDCC) $(SDCCFLAGS) -c $< -o $@
42 $(PORT_CASES_DIR)/%$(OBJEXT): $(srcdir)/fwk/lib/%.c
43 $(SDCC) $(SDCCFLAGS) -c $< -o $@
45 $(PORT_CASES_DIR)/fwk.lib: $(srcdir)/fwk/lib/fwk.lib
46 cat < $(srcdir)/fwk/lib/fwk.lib > $@
48 # PENDING: Path to sdcc-extra
49 %.out: %$(BINEXT)
50 mkdir -p $(dir $@)
51 $(EMU) -k $< > $@
52 -grep -n FAIL $@ /dev/null || true
54 _clean: