mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
Makefile: allow configurator to use a different CC, by setting CONFIGURATOR_CC
This should solve what @icota wanted in https://github.com/ElementsProject/lightning/pull/1035 in a much cleaner way. In particular, this allows you to say what configurator should use, independent of what other compilation should use, and reverts the '-static' which broke MacOS. Fixes: #1059 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8c2a556f55
commit
229f288eb5
5
Makefile
5
Makefile
@ -163,6 +163,9 @@ CWARNFLAGS := -Werror -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations
|
||||
CDEBUGFLAGS := -std=gnu11 -g -fstack-protector
|
||||
CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I/usr/local/include $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS)
|
||||
|
||||
# We can get configurator to run a different compile cmd to cross-configure.
|
||||
CONFIGURATOR_CC := $(CC)
|
||||
|
||||
LDFLAGS = $(PIE_LDFLAGS)
|
||||
LDLIBS = -L/usr/local/lib -lm -lgmp -lsqlite3 $(COVFLAGS)
|
||||
|
||||
@ -269,7 +272,7 @@ ALL_PROGRAMS += ccan/ccan/cdump/tools/cdump-enumstr
|
||||
ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS) Makefile
|
||||
|
||||
ccan/config.h: ccan/tools/configurator/configurator
|
||||
if $< $(CC) -static > $@.new; then mv $@.new $@; else rm $@.new; exit 1; fi
|
||||
if $< --configurator-cc="$(CONFIGURATOR_CC)" $(CC) $(CFLAGS) > $@.new; then mv $@.new $@; else rm $@.new; exit 1; fi
|
||||
|
||||
gen_version.h: FORCE
|
||||
@(echo "#define VERSION \"`git describe --always --dirty`\"" && echo "#define VERSION_NAME \"$(NAME)\"" && echo "#define BUILD_FEATURES \"$(FEATURES)\"") > $@.new
|
||||
|
Loading…
Reference in New Issue
Block a user