X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Fports%2Fhc08%2Fspec.mk;h=0db5e33089728b4abaded6bd768f62706c154339;hb=68cf035ac940c45599b4c0e3b72856e1d14447d4;hp=7257b6920d6764ca897ee87a127b2518bac83915;hpb=ef52b86c1cf07afd10e9853931526c56130876a3;p=fw%2Fsdcc diff --git a/support/regression/ports/hc08/spec.mk b/support/regression/ports/hc08/spec.mk index 7257b692..0db5e330 100644 --- a/support/regression/ports/hc08/spec.mk +++ b/support/regression/ports/hc08/spec.mk @@ -1,13 +1,25 @@ +# Regression test specification for the hc08 target running with uCsim +# + # path to uCsim -UCHC08A = $(top_builddir)/sim/ucsim/hc08.src/shc08 -UCHC08B = $(top_builddir)/bin/shc08 +ifdef SDCC_BIN_PATH + UCHC08 = $(SDCC_BIN_PATH)/shc08 + + AS_HC08 = $(SDCC_BIN_PATH)/as-hc08 +else + UCHC08A = $(top_builddir)/sim/ucsim/hc08.src/shc08 + UCHC08B = $(top_builddir)/bin/shc08 + + UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi) + + AS_HC08 = $(top_builddir)/bin/as-hc08 -UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi) + SDCCFLAGS += --nostdinc + LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/hc08 +endif -SDCCFLAGS +=-mhc08 --nostdinc --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir) -LINKFLAGS = --nostdlib +SDCCFLAGS +=-mhc08 --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir) LINKFLAGS += hc08.lib -LIBDIR = $(top_builddir)/device/lib/build/hc08 OBJEXT = .rel EXEEXT = .ihx @@ -18,10 +30,10 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) #%$(EXEEXT): %$(OBJEXT) $(EXTRAS) %$(EXEEXT): %$(OBJEXT) $(EXTRAS) - $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@ + $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@ %$(OBJEXT): %.asm - $(top_builddir)/bin/as-hc08 -plosgff $< + $(AS_HC08) -plosgff $< %$(OBJEXT): %.c $(SDCC) $(SDCCFLAGS) -c $< -o $@