diff --git a/Makefile b/Makefile index 956d8c0..0d565fd 100644 --- a/Makefile +++ b/Makefile @@ -35,10 +35,17 @@ HDR_INSTALL= \ config.unix.mk \ config.vs2013-64.mk \ config.vs2013.mk \ - rules.mk + rules.mk \ + config.local-setup..mk + +PREFIX_LIB=$(PREFIX)lib/make-it-quick/config/ +LIB_INSTALL=$(wildcard config/check*.c) # Include the makefile rules with special BUILD path BUILD=./ include $(BUILD)rules.mk TESTS=example/ + +config.local-setup.mk: + $(PRINT_GENERATE) echo > $@ CONFIG_SOURCES=$(PREFIX_LIB)make-it-quick/ diff --git a/config.mk b/config.mk index 73fbb3a..4029d8d 100644 --- a/config.mk +++ b/config.mk @@ -58,6 +58,10 @@ TO_INSTALL= $(OUTPUT_EXE:%=%.install_exe) \ $(DLL_INSTALL:%=%.install_dll) \ $(HDR_INSTALL:%=%.install_hdr) +# Local setup - Location of configuration files, etc (tweaked at install time) +-include $(BUILD)config.local-setup.mk +CONFIG_SOURCES?=/usr/lib/make-it-quick/ + # Sources to reformat CLANG_FORMAT_SOURCES=$(SOURCES) $(HDR_INSTALL) diff --git a/rules.mk b/rules.mk index fd414ef..3195af5 100644 --- a/rules.mk +++ b/rules.mk @@ -442,11 +442,11 @@ $(OBJDIR)CFG-LIB_HAVE_lib%.c: $(PKG_DEPS) # Check if a function is present $(OBJDIR)CFG_HAVE_%.h: $(OBJDIR)CFG-FN_HAVE_%.c $(CONFIG_DEPS) $(PRINT_CONFIG) $(FN_CONFIG) -$(OBJDIR)CFG-FN_HAVE_%.c: $(BUILD)config/HAVE_%.c $(CONFIG_DEPS) +$(OBJDIR)CFG-FN_HAVE_%.c: $(CONFIG_SOURCES)config/HAVE_%.c $(CONFIG_DEPS) $(PRINT_COMMAND) cp $< $@ $(OBJDIR)CFG-FN_HAVE_%.c: config/HAVE_%.c $(CONFIG_DEPS) $(PRINT_COMMAND) cp $< $@ -$(OBJDIR)CFG-FN_HAVE_%.c: $(BUILD)config/check_%.c $(CONFIG_DEPS) +$(OBJDIR)CFG-FN_HAVE_%.c: $(CONFIG_SOURCES)config/check_%.c $(CONFIG_DEPS) $(PRINT_COMMAND) cp $< $@ $(OBJDIR)CFG-FN_HAVE_%.c: config/check_%.c $(CONFIG_DEPS) $(PRINT_COMMAND) cp $< $@