diff options
Diffstat (limited to 'templates/Makefile.template')
-rw-r--r-- | templates/Makefile.template | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index 4a04af122d..50b81e5f9f 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -37,10 +37,10 @@ # warnings we'd like, but that dont exist in all compilers PREFERRED_WARNINGS=['shadow', 'extra-semi'] - CHECK_WARNINGS=PREFERRED_WARNINGS + ['no-shift-negative-value'] + CHECK_WARNINGS=PREFERRED_WARNINGS + ['no-shift-negative-value', 'no-unused-but-set-variable', 'no-maybe-uninitialized'] def warning_var(fmt, warning): - return fmt % warning.replace('-', '_').upper() + return fmt % warning.replace('-', '_').replace('+', 'X').upper() def neg_warning(warning): if warning[0:3] == 'no-': @@ -191,6 +191,12 @@ TMPOUT = `mktemp /tmp/test-out-XXXXXX` endif + CHECK_NO_CXX14_COMPAT_WORKS_CMD = $(CC) -std=c++11 -Werror -Wno-c++14-compat -o $(TMPOUT) -c test/build/no-c++14-compat.cc + HAS_WORKING_NO_CXX14_COMPAT = $(shell $(CHECK_NO_CXX14_COMPAT_WORKS_CMD) 2> /dev/null && echo true || echo false) + ifeq ($(HAS_WORKING_NO_CXX14_COMPAT),true) + W_NO_CXX14_COMPAT=-Wno-c++14-compat + endif + %for warning in CHECK_WARNINGS: ${warning_var('CHECK_%s_WORKS_CMD', warning)} = $(CC) -std=c99 -Werror -W${warning} -o $(TMPOUT) -c test/build/${warning}.c ${warning_var('HAS_WORKING_%s', warning)} = $(shell $(${warning_var('CHECK_%s_WORKS_CMD', warning)}) 2> /dev/null && echo true || echo false) @@ -915,6 +921,16 @@ % endfor + static_csharp: static_c \ + % for lib in libs: + % if 'Makefile' in lib.get('build_system', ['Makefile']): + % if lib.build == 'all' and lib.language == 'csharp': + $(LIBDIR)/$(CONFIG)/lib${lib.name}.a\ + % endif + % endif + % endfor + + shared: shared_c shared_cxx shared_c: pc_c pc_c_unsecure cache.mk\ @@ -1271,6 +1287,11 @@ $(Q) mkdir -p `dirname $@` $(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< + $(OBJDIR)/$(CONFIG)/%.o : %.cpp + $(E) "[CXX] Compiling $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< + install: install_c install_cxx install-plugins install-certs install_c: install-headers_c install-static_c install-shared_c |