aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSlava Yurin <[email protected]>2014-11-18 20:32:27 +0600
committerSlava Yurin <[email protected]>2014-11-19 17:51:42 +0600
commitf26cb713b0da9b131ed61d9537efd5aef519a6c4 (patch)
tree6558af347fdabacb6a8aaaf3bb49888f56a0f032 /plugins
parent7e41b8b9893f449ea4fde9dcbaa9311623a4d53e (diff)
downloaderlang.mk-f26cb713b0da9b131ed61d9537efd5aef519a6c4.tar.gz
erlang.mk-f26cb713b0da9b131ed61d9537efd5aef519a6c4.tar.bz2
erlang.mk-f26cb713b0da9b131ed61d9537efd5aef519a6c4.zip
Compile all *.c files in c_src and sub dir
Diffstat (limited to 'plugins')
-rw-r--r--plugins/c_src.mk8
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):