X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Fports%2Fhost%2Fspec.mk;h=e48551c9cd87ba8c927bccc063ee0452655c8f01;hb=a9fac239e06ffa5aebdf9590931b65cf5e0ca11a;hp=a469d53ceae2d69c3ae069a9e7881309adb3593d;hpb=85233d43ae2d506b9cc324c9e86254ea47b1b348;p=fw%2Fsdcc diff --git a/support/regression/ports/host/spec.mk b/support/regression/ports/host/spec.mk index a469d53c..e48551c9 100644 --- a/support/regression/ports/host/spec.mk +++ b/support/regression/ports/host/spec.mk @@ -1,30 +1,36 @@ # Port specification for compiling on the host machines version of gcc SDCC = $(shell ( sh -c "gcc --version" 2>&1 ) > /dev/null && echo gcc || echo cc) -SDCCFLAGS = -DPORT_HOST=1 -Wall -fsigned-char -fpack-struct -DREENTRANT= +SDCCFLAGS = $(CPPFLAGS) -DPORT_HOST=1 -fsigned-char -fpack-struct -DREENTRANT= -I$(top_builddir) -I$(top_srcdir) +# disable all warnings: +SDCCFLAGS+= -w +# enable all warnings: +#SDCCFLAGS+= -Wall EXEEXT = .bin OBJEXT = .o +INC_DIR = . -# otherwise `make` deletes it and `make -j`will fail -.PRECIOUS: ports/$(PORT)/testfwk$(OBJEXT) +# otherwise `make` deletes testfwk.o and `make -j` will fail +.PRECIOUS: $(PORT_CASES_DIR)/%$(OBJEXT) # Required extras -EXTRAS = ports/$(PORT)/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT) +EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) %.out: %$(EXEEXT) - mkdir -p `dirname $@` + mkdir -p $(dir $@) -$< > $@ - -grep -n FAIL $@ /dev/null || true + -grep -n FAIL $@ /dev/null || true %$(EXEEXT): %$(OBJEXT) $(EXTRAS) - $(SDCC) $(SDCCFLAGS) -o $@ $< $(EXTRAS) + $(SDCC) $(SDCCFLAGS) -o $@ $< $(EXTRAS) -lm %$(OBJEXT): %.c $(SDCC) $(SDCCFLAGS) -c $< -o $@ -ports/$(PORT)/%$(OBJEXT): fwk/lib/%.c +$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c $(SDCC) $(SDCCFLAGS) -c $< -o $@ -_clean: - rm -f ports/$(PORT)/support.o ports/$(PORT)/testfwk$(OBJEXT) +$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c + $(SDCC) $(SDCCFLAGS) -c $< -o $@ +_clean: