X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=Makefile;h=4826af1040efde1ecc7c15bb7759bd781bada64b;hb=5b419421e4a9a7ec50be2992fc640314b3520faf;hp=52f316528ac17ff370a5743f78a4d0032a44b14a;hpb=ad747cdb5754c81947b3191c18031c4a809e39a4;p=fw%2Fsdcc diff --git a/Makefile b/Makefile index 52f31652..4826af10 100644 --- a/Makefile +++ b/Makefile @@ -2,25 +2,25 @@ # # -CFLAGS+=-g - SHELL = /bin/sh -AUTOCONF = autoconf PRJDIR = . -srcdir = . -include $(srcdir)/Makefile.common + +include $(PRJDIR)/Makefile.common SDCC_MISC = debugger/mcs51 sim/ucsim +SDCC_LIBS = support/cpp2 support/makebin +SDCC_DOC = doc -SDCC_LIBS = support/cpp support/cpp2 +# Parts that are not normally compiled but need to be cleaned +SDCC_EXTRA = support/regression SDCC_ASLINK = as/mcs51 as link SDCC_PACKIHX = packihx -TARGETS = sdcc-libs sdcc-cc sdcc-aslink +TARGETS = sdcc-libs sdcc-cc sdcc-aslink sdcc-doc -PKGS = $(SDCC_LIBS) src $(SDCC_ASLINK) $(SDCC_PACKIHX) +PKGS = $(SDCC_LIBS) src $(SDCC_ASLINK) $(SDCC_DOC) ifneq ($(OPT_ENABLE_UCSIM), no) TARGETS += sdcc-misc @@ -63,7 +63,7 @@ sdcc-misc: sdcc-packihx: $(MAKE) -C $(SDCC_PACKIHX) -sdcc-device: +sdcc-device: sdcc-cc sdcc-aslink $(MAKE) -C device/include $(MAKE) -C device/lib @@ -71,6 +71,9 @@ sdcc-device-tini: $(MAKE) -C device/include $(MAKE) -C device/lib modelDS390 +# Empty for now, as doc depends on latex and latex2html +sdcc-doc: + sdcc: $(TARGETS) sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx @@ -114,10 +117,9 @@ clean: $(MAKE) -f clean.mk clean @echo "+ Cleaning packages in their directories..." for pkg in $(PKGS); do\ - $(MAKE) PORTS="$(PORTS)" -C $$pkg clean ;\ + $(MAKE) PORTS="$(PORTS)" EXEEXT=$(EXEEXT) -C $$pkg -f clean.mk clean ;\ done - # Deleting all files created by configuring or building the program # ----------------------------------------------------------------- distclean: @@ -125,16 +127,18 @@ distclean: $(MAKE) -f clean.mk distclean @echo "+ DistCleaning packages using clean.mk..." for pkg in $(PKGS); do\ - $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" distclean ;\ + $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) -f clean.mk distclean ;\ + done + for pkg in $(SDCC_EXTRA); do \ + $(MAKE) -C $$pkg clean; \ done - # Like clean but some files may still exist # ----------------------------------------- mostlyclean: clean $(MAKE) -f clean.mk mostlyclean for pkg in $(PKGS); do\ - $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" mostlyclean ;\ + $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" EXEEXT=$(EXEEXT) mostlyclean ;\ done @@ -144,7 +148,7 @@ mostlyclean: clean realclean: distclean $(MAKE) -f clean.mk realclean for pkg in $(PKGS); do\ - $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" realclean ;\ + $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" EXEEXT=$(EXEEXT) realclean ;\ done