summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-11-23 23:36:28 +0100
committertomsmeding <tom.smeding@gmail.com>2019-11-23 23:36:43 +0100
commite2492535cf8ecff85595712e69774d94dd98a751 (patch)
tree4141ddf5fee8c82ea00df9e2dfcf6f8fd4a53e7b /plugins
parent8b91af88666b2289daaf7ca655ab039c8ad9488a (diff)
Proper rebuilding of plugins when headers change
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Makefile b/plugins/Makefile
index 130ee0f..cace09b 100644
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -35,5 +35,8 @@ endif
.SECONDARY:
-$(PLUGINNAME)/%.$(SO_EXT): $(patsubst %.c,%.o,$(wildcard $(PLUGINNAME)/*.c)) $(wildcard ../*.o ../*.h)
+$(PLUGINNAME)/%.$(SO_EXT): $(patsubst %.c,%.o,$(wildcard $(PLUGINNAME)/*.c)) $(wildcard ../*.o)
$(CC) $(SO_FLAGS) -o $@ $(filter %.o,$^)
+
+$(PLUGINNAME)/%.o: $(PLUGINNAME)/%.c $(wildcard $(PLUGINNAME)/*.h) $(wildcard ../*.h)
+ $(CC) $(CFLAGS) -c -o $@ $<