diff --git a/compile.mk b/compile.mk index 45e126ad..5a2707ad 100644 --- a/compile.mk +++ b/compile.mk @@ -39,12 +39,13 @@ CXXFLAGS += $(FLAGS) OBJECTS += $(patsubst %, build/%.o, $(SOURCES)) DEPS = $(patsubst %, build/%.d, $(SOURCES)) +RESOURCES += # Final targets -$(TARGET): $(OBJECTS) - $(CXX) -o $@ $^ $(LDFLAGS) +$(TARGET): $(RESOURCES) $(OBJECTS) + $(CXX) -o $@ $(OBJECTS) $(LDFLAGS) -include $(DEPS) diff --git a/plugin.mk b/plugin.mk index 96d3040d..37776dfc 100644 --- a/plugin.mk +++ b/plugin.mk @@ -26,7 +26,7 @@ ifeq ($(ARCH), win) endif -all: $(RESOURCES) $(TARGET) +all: $(TARGET) include $(RACK_DIR)/compile.mk @@ -38,11 +38,12 @@ dist: all mkdir -p dist/$(SLUG) # Strip and copy plugin binary cp $(TARGET) dist/$(SLUG)/ - strip -s dist/$(SLUG)/$(TARGET) + strip dist/$(SLUG)/$(TARGET) # Copy distributables cp -R $(DISTRIBUTABLES) dist/$(SLUG)/ # Create ZIP package cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG) + .PHONY: clean dist .DEFAULT_GOAL := all