* support/regression/Makefile: inter-port-clean adjusted for mcs51
[fw/sdcc] / support / regression / ports / mcs51 / spec.mk
1 # Port specification for the mcs51 port running with uCsim
2
3 S51 = ../../sim/ucsim/s51.src/s51
4
5 SDCCFLAGS += --lesspedantic -DREENTRANT=reentrant -DGENERIC=_generic --stack-after-data
6
7 OBJEXT = .rel
8 EXEEXT = .ihx
9
10 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
11 EXTRAS = fwk/lib/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT)
12
13 # Rule to link into .ihx
14 %.ihx: %$(OBJEXT) $(EXTRAS)
15         $(SDCC) $(SDCCFLAGS) $(EXTRAS) $<
16         mv fwk/lib/testfwk.ihx $@
17         mv fwk/lib/testfwk.map $(@:.ihx=.map)
18
19 %$(OBJEXT): %.c
20         $(SDCC) $(SDCCFLAGS) -c $<
21
22 # PENDING: Path to sdcc-extra
23 %.out: %$(EXEEXT)
24         mkdir -p `dirname $@`
25         $(S51) -t32 -S in=$(shell tty),out=$@ $< < ports/mcs51/uCsim.cmd >/dev/null 2>&1
26         -grep -n FAIL $@ /dev/null || true