diff options
author | Loïc Hoguin <[email protected]> | 2015-05-12 22:45:26 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-05-12 22:45:26 +0300 |
commit | 418969e804841f3f9724935dc9affc80c58d0f57 (patch) | |
tree | 521bf175b94dc2ddeeceab1d731bc4f2860f918d /plugins | |
parent | 0027afa6f557a7da5b126ae658f655c6529a5876 (diff) | |
download | erlang.mk-418969e804841f3f9724935dc9affc80c58d0f57.tar.gz erlang.mk-418969e804841f3f9724935dc9affc80c58d0f57.tar.bz2 erlang.mk-418969e804841f3f9724935dc9affc80c58d0f57.zip |
More improvements for building dependencies
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/c_src.mk | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/plugins/c_src.mk b/plugins/c_src.mk index e23c7b9..5616923 100644 --- a/plugins/c_src.mk +++ b/plugins/c_src.mk @@ -2,7 +2,6 @@ # This file is part of erlang.mk and subject to the terms of the ISC License. .PHONY: clean-c_src distclean-c_src-env -# todo # Configuration. @@ -50,7 +49,11 @@ link_verbose = $(link_verbose_$(V)) ifeq ($(wildcard $(C_SRC_DIR)),) else ifneq ($(wildcard $(C_SRC_DIR)/Makefile),) app:: - $(MAKE) -C $(C_SRC_DIR) + $(MAKE) -C $(C_SRC_DIR) \ + CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + LDLIBS="$(LDLIBS)" \ + LDFLAGS="$(LDFLAGS)" clean:: $(MAKE) -C $(C_SRC_DIR) clean @@ -80,6 +83,14 @@ $(C_SRC_OUTPUT): $(OBJECTS) %.o: %.cpp $(COMPILE_CPP) $(OUTPUT_OPTION) $< +clean:: clean-c_src + +clean-c_src: + $(gen_verbose) rm -f $(C_SRC_OUTPUT) $(OBJECTS) + +endif + +ifneq ($(wildcard $(C_SRC_DIR)),) $(C_SRC_ENV): @$(ERL) -eval "file:write_file(\"$(C_SRC_ENV)\", \ io_lib:format( \ @@ -91,11 +102,6 @@ $(C_SRC_ENV): code:lib_dir(erl_interface, lib)])), \ halt()." -clean:: clean-c_src - -clean-c_src: - $(gen_verbose) rm -f $(C_SRC_OUTPUT) $(OBJECTS) - distclean:: distclean-c_src-env distclean-c_src-env: |