You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plugin.mk 821B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. RACK_DIR ?= ../..
  2. FLAGS += -fPIC \
  3. -I$(RACK_DIR)/include -I$(RACK_DIR)/dep/include
  4. ifdef SLUG
  5. FLAGS += -DSLUG=$(SLUG)
  6. endif
  7. include $(RACK_DIR)/arch.mk
  8. ifeq ($(ARCH), lin)
  9. LDFLAGS += -shared
  10. TARGET = plugin.so
  11. endif
  12. ifeq ($(ARCH), mac)
  13. LDFLAGS += -shared -undefined dynamic_lookup
  14. TARGET = plugin.dylib
  15. endif
  16. ifeq ($(ARCH), win)
  17. LDFLAGS += -shared -L$(RACK_DIR) -lRack
  18. TARGET = plugin.dll
  19. endif
  20. all: $(TARGET)
  21. include $(RACK_DIR)/compile.mk
  22. clean:
  23. rm -rfv build $(TARGET) dist
  24. dist: all
  25. rm -rf dist
  26. mkdir -p dist/$(SLUG)
  27. # Strip and copy plugin binary
  28. cp $(TARGET) dist/$(SLUG)/
  29. strip dist/$(SLUG)/$(TARGET)
  30. # Copy distributables
  31. cp -R $(DISTRIBUTABLES) dist/$(SLUG)/
  32. # Create ZIP package
  33. cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG)
  34. .PHONY: clean dist
  35. .DEFAULT_GOAL := all