changeset 546:80b21c6b4a6b

Disable building all the lwcc binaries except lwcpp by default Since lwcpp is functional but the rest of the stuff in the lwcc directory is not, only build lwcpp by default.
author William Astle <lost@l-w.ca>
date Thu, 16 Mar 2023 16:03:20 -0600
parents 1fa6eca684e5
children 33e37b3d98cf
files Makefile
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Mar 16 16:02:01 2023 -0600
+++ b/Makefile	Thu Mar 16 16:03:20 2023 -0600
@@ -54,16 +54,20 @@
 	lwlink/lwlink$(PROGSUFFIX) \
 	lwar/lwar$(PROGSUFFIX) \
 	lwlink/lwobjdump$(PROGSUFFIX) \
-	lwcc/lwcc$(PROGSUFFIX) \
-	lwcc/lwcc-cpp$(PROGSUFFIX) \
+	lwcc/lwcc-cpp$(PROGSUFFIX)
+
+SECONDARY_TARGETS := lwcc/lwcc$(PROGSUFFIX) \
 	lwcc/lwcc-cc$(PROGSUFFIX)
 
 LWCC_LIBBIN_FILES = lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/lwcc-cc$(PROGSUFFIX)
 LWCC_LIBLIB_FILES =
 LWCC_LIBINC_FILES =
 
+.PHONY: default
+default: $(MAIN_TARGETS)
+
 .PHONY: all
-all: $(MAIN_TARGETS)
+all: $(MAIN_TARGETS) $(SECONDARY_TARGETS)
 
 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c
 lwar_srcs := $(addprefix lwar/,$(lwar_srcs))
@@ -193,7 +197,7 @@
 clean: $(cleantargs)
 	@echo "Cleaning up"
 	@rm -f lwlib/liblw.a lwasm/lwasm$(PROGSUFFIX) lwlink/lwlink$(PROGSUFFIX) lwlink/lwobjdump$(PROGSUFFIX) lwar/lwar$(PROGSUFFIX)
-	@rm -f lwcc/lwcc$(PROGSUFFIX) lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/libcpp.a
+	@rm -f lwcc/lwcc$(PROGSUFFIX) lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/lwcc-cc$(PROGSUFFIX) lwcc/libcpp.a
 	@rm -f $(lwcc_driver_objs) $(lwcc_cpp_objs) $(lwcc_cpplib_objs) $(lwcc_cc_objs)
 	@rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs)
 	@rm -f $(extra_clean)
@@ -213,6 +217,10 @@
 	install -d $(INSTALLDIR)
 	install -d $(INSTALLBIN)
 	install $(MAIN_TARGETS) $(INSTALLBIN)
+
+.PHONY: install-all
+install-all: install
+	install $(SECONDARY_TARGETS) $(INSTALLBIN)
 	install -d $(LWCC_INSTALLLIBDIR)
 	install -d $(LWCC_INSTALLLIBDIR)/bin
 	install -d $(LWCC_INSTALLLIBDIR)/lib