struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / ports / pdk13 / spec.mk
bloba1d86711763a81b294595b31951016494bf06509
1 # Regression test specification for the pdk13 target running with uCsim
3 EMU_PORT_FLAG = -tPDK13
5 # path to uCsim
6 ifdef SDCC_BIN_PATH
7 UCPDK13C = $(SDCC_BIN_PATH)/ucsim_pdk$(EXEEXT)
9 AS_PDK13C = $(SDCC_BIN_PATH)/sdaspdk$(EXEEXT)
10 else
11 ifdef UCSIM_DIR
12 UCPDK13A = $(UCSIM_DIR)/pdk.src/ucsim_pdk$(EXEEXT)
13 else
14 UCPDK13A = $(top_builddir)/sim/ucsim/src/sims/pdk.src/ucsim_pdk$(EXEEXT)
15 UCPDK13B = $(top_builddir)/bin/ucsim_pdk$(EXEEXT)
16 endif
18 EMU = $(WINE) $(shell if [ -f $(UCPDK13A) ]; then echo $(UCPDK13A); else echo $(UCPDK13B); fi)
20 AS = $(WINE) $(top_builddir)/bin/sdaspdk$(EXEEXT)
22 ifndef CROSSCOMPILING
23 SDCCFLAGS += --nostdinc -I$(top_srcdir)
24 LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pdk13
25 endif
26 endif
28 ifdef CROSSCOMPILING
29 SDCCFLAGS += -I$(top_srcdir)
30 endif
32 SDCCFLAGS += -mpdk13 --less-pedantic --out-fmt-ihx
33 LINKFLAGS += pdk13.lib
35 OBJEXT = .rel
36 BINEXT = .ihx
38 # otherwise `make` deletes testfwk.rel and `make -j` will fail
39 .PRECIOUS: $(PORT_CASES_DIR)/%$(OBJEXT)
41 # Required extras
42 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
43 include $(srcdir)/fwk/lib/spec.mk
45 # Rule to link into .ihx
46 %$(BINEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
47 $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
49 %$(OBJEXT): %.asm
50 $(AS) -plosgff $<
52 %$(OBJEXT): %.c
53 $(SDCC) $(SDCCFLAGS) -c $< -o $@
55 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
56 $(SDCC) $(SDCCFLAGS) -c $< -o $@
58 $(PORT_CASES_DIR)/%$(OBJEXT): $(srcdir)/fwk/lib/%.c
59 $(SDCC) $(SDCCFLAGS) -c $< -o $@
61 $(PORT_CASES_DIR)/fwk.lib: $(srcdir)/fwk/lib/fwk.lib
62 cat < $(srcdir)/fwk/lib/fwk.lib > $@
64 _clean: