diff options
author | Slava Yurin <[email protected]> | 2014-11-18 20:32:27 +0600 |
---|---|---|
committer | Slava Yurin <[email protected]> | 2014-11-19 17:51:42 +0600 |
commit | f26cb713b0da9b131ed61d9537efd5aef519a6c4 (patch) | |
tree | 6558af347fdabacb6a8aaaf3bb49888f56a0f032 | |
parent | 7e41b8b9893f449ea4fde9dcbaa9311623a4d53e (diff) | |
download | erlang.mk-f26cb713b0da9b131ed61d9537efd5aef519a6c4.tar.gz erlang.mk-f26cb713b0da9b131ed61d9537efd5aef519a6c4.tar.bz2 erlang.mk-f26cb713b0da9b131ed61d9537efd5aef519a6c4.zip |
Compile all *.c files in c_src and sub dir
-rw-r--r-- | plugins/c_src.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/c_src.mk b/plugins/c_src.mk index 99b1c66..0aee88c 100644 --- a/plugins/c_src.mk +++ b/plugins/c_src.mk @@ -46,9 +46,13 @@ clean:: $(MAKE) -C $(C_SRC_DIR) clean else -app:: $(C_SRC_ENV) +SOURCE := $(shell find $(C_SRC_DIR) -type f -name \*.c) + +app:: $(C_SRC_ENV) $(C_SRC_OUTPUT) + +$(C_SRC_OUTPUT): $(SOURCE) @mkdir -p priv/ - $(c_src_verbose) $(CC) $(CFLAGS) $(C_SRC_DIR)/*.c \ + $(c_src_verbose) $(CC) $(CFLAGS) $(SOURCE) \ $(LDFLAGS) $(LDLIBS) -o $(C_SRC_OUTPUT) $(C_SRC_OPTS) $(C_SRC_ENV): |