1 # Port specification for compiling on the host machines version of gcc
2 SDCC = $(shell ( sh -c "gcc --version" 2>&1 ) > /dev/null && echo gcc || echo cc)
3 SDCCFLAGS = $(CPPFLAGS) -DPORT_HOST=1 -fsigned-char -fpack-struct -DREENTRANT= -I$(top_builddir) -I$(top_srcdir)
4 # disable all warnings:
13 # otherwise `make` deletes testfwk.o and `make -j` will fail
14 .PRECIOUS: $(PORT_CASES_DIR)/%$(OBJEXT)
17 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
22 -grep -n FAIL $@ /dev/null || true
24 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
25 $(SDCC) $(SDCCFLAGS) -o $@ $< $(EXTRAS) -lm
28 $(SDCC) $(SDCCFLAGS) -c $< -o $@
30 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
31 $(SDCC) $(SDCCFLAGS) -c $< -o $@
33 $(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
34 $(SDCC) $(SDCCFLAGS) -c $< -o $@