comparison Makefile @ 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 b2ee86298516
comparison
equal deleted inserted replaced
545:1fa6eca684e5 546:80b21c6b4a6b
52 52
53 MAIN_TARGETS := lwasm/lwasm$(PROGSUFFIX) \ 53 MAIN_TARGETS := lwasm/lwasm$(PROGSUFFIX) \
54 lwlink/lwlink$(PROGSUFFIX) \ 54 lwlink/lwlink$(PROGSUFFIX) \
55 lwar/lwar$(PROGSUFFIX) \ 55 lwar/lwar$(PROGSUFFIX) \
56 lwlink/lwobjdump$(PROGSUFFIX) \ 56 lwlink/lwobjdump$(PROGSUFFIX) \
57 lwcc/lwcc$(PROGSUFFIX) \ 57 lwcc/lwcc-cpp$(PROGSUFFIX)
58 lwcc/lwcc-cpp$(PROGSUFFIX) \ 58
59 SECONDARY_TARGETS := lwcc/lwcc$(PROGSUFFIX) \
59 lwcc/lwcc-cc$(PROGSUFFIX) 60 lwcc/lwcc-cc$(PROGSUFFIX)
60 61
61 LWCC_LIBBIN_FILES = lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/lwcc-cc$(PROGSUFFIX) 62 LWCC_LIBBIN_FILES = lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/lwcc-cc$(PROGSUFFIX)
62 LWCC_LIBLIB_FILES = 63 LWCC_LIBLIB_FILES =
63 LWCC_LIBINC_FILES = 64 LWCC_LIBINC_FILES =
64 65
66 .PHONY: default
67 default: $(MAIN_TARGETS)
68
65 .PHONY: all 69 .PHONY: all
66 all: $(MAIN_TARGETS) 70 all: $(MAIN_TARGETS) $(SECONDARY_TARGETS)
67 71
68 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c 72 lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c
69 lwar_srcs := $(addprefix lwar/,$(lwar_srcs)) 73 lwar_srcs := $(addprefix lwar/,$(lwar_srcs))
70 74
71 lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \ 75 lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \
191 195
192 .PHONY: clean 196 .PHONY: clean
193 clean: $(cleantargs) 197 clean: $(cleantargs)
194 @echo "Cleaning up" 198 @echo "Cleaning up"
195 @rm -f lwlib/liblw.a lwasm/lwasm$(PROGSUFFIX) lwlink/lwlink$(PROGSUFFIX) lwlink/lwobjdump$(PROGSUFFIX) lwar/lwar$(PROGSUFFIX) 199 @rm -f lwlib/liblw.a lwasm/lwasm$(PROGSUFFIX) lwlink/lwlink$(PROGSUFFIX) lwlink/lwobjdump$(PROGSUFFIX) lwar/lwar$(PROGSUFFIX)
196 @rm -f lwcc/lwcc$(PROGSUFFIX) lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/libcpp.a 200 @rm -f lwcc/lwcc$(PROGSUFFIX) lwcc/lwcc-cpp$(PROGSUFFIX) lwcc/lwcc-cc$(PROGSUFFIX) lwcc/libcpp.a
197 @rm -f $(lwcc_driver_objs) $(lwcc_cpp_objs) $(lwcc_cpplib_objs) $(lwcc_cc_objs) 201 @rm -f $(lwcc_driver_objs) $(lwcc_cpp_objs) $(lwcc_cpplib_objs) $(lwcc_cc_objs)
198 @rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs) 202 @rm -f $(lwasm_objs) $(lwlink_objs) $(lwar_objs) $(lwlib_objs) $(lwobjdump_objs)
199 @rm -f $(extra_clean) 203 @rm -f $(extra_clean)
200 @rm -f */*.exe 204 @rm -f */*.exe
201 205
211 .PHONY: install 215 .PHONY: install
212 install: $(MAIN_TARGETS) 216 install: $(MAIN_TARGETS)
213 install -d $(INSTALLDIR) 217 install -d $(INSTALLDIR)
214 install -d $(INSTALLBIN) 218 install -d $(INSTALLBIN)
215 install $(MAIN_TARGETS) $(INSTALLBIN) 219 install $(MAIN_TARGETS) $(INSTALLBIN)
220
221 .PHONY: install-all
222 install-all: install
223 install $(SECONDARY_TARGETS) $(INSTALLBIN)
216 install -d $(LWCC_INSTALLLIBDIR) 224 install -d $(LWCC_INSTALLLIBDIR)
217 install -d $(LWCC_INSTALLLIBDIR)/bin 225 install -d $(LWCC_INSTALLLIBDIR)/bin
218 install -d $(LWCC_INSTALLLIBDIR)/lib 226 install -d $(LWCC_INSTALLLIBDIR)/lib
219 install -d $(LWCC_INSTALLLIBDIR)/include 227 install -d $(LWCC_INSTALLLIBDIR)/include
220 ifneq ($(LWCC_LIBBIN_FILES),) 228 ifneq ($(LWCC_LIBBIN_FILES),)