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.

47 lines
747B

  1. # All paths here assume the PWD is plugin/something
  2. RACK_DIR ?= ../..
  3. FLAGS += -fPIC \
  4. -I$(RACK_DIR)/include -I $(RACK_DIR)/dep/include
  5. ifdef SLUG
  6. FLAGS += -DSLUG=$(SLUG)
  7. endif
  8. include $(RACK_DIR)/arch.mk
  9. ifeq ($(ARCH), lin)
  10. LDFLAGS += -shared
  11. TARGET = plugin.so
  12. endif
  13. ifeq ($(ARCH), mac)
  14. LDFLAGS += -shared -undefined dynamic_lookup
  15. TARGET = plugin.dylib
  16. endif
  17. ifeq ($(ARCH), win)
  18. LDFLAGS += -shared -L$(RACK_DIR) -lRack
  19. TARGET = plugin.dll
  20. endif
  21. DISTRIBUTABLES += $(TARGET)
  22. all: $(TARGET)
  23. include $(RACK_DIR)/compile.mk
  24. clean:
  25. rm -rfv build $(TARGET) dist
  26. dist: all
  27. rm -rf dist
  28. mkdir -p dist/$(SLUG)
  29. cp -R $(DISTRIBUTABLES) dist/$(SLUG)/
  30. cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG)
  31. .PHONY: clean dist