1 2# compiler 3CC ?= gcc 4 5# flags 6CFLAGS += -funroll-loops -ffast-math -fomit-frame-pointer -Wall -Werror -fPIC -DPIC -I../utils 7LDFLAGS += -shared -Wl,--as-needed -Wl,--no-undefined -lm -lrt 8 9ifneq ($(NOOPT),true) 10CFLAGS += -mtune=generic -msse -msse2 -mfpmath=sse 11endif 12 13# remove command 14RM = rm -f 15 16# plugin name 17PLUGIN = $(shell basename $(shell pwd) | tr A-Z a-z) 18PLUGIN_SO = tap_$(PLUGIN).so 19 20# effect path 21EFFECT_PATH = $(PLUGIN).lv2 22 23# installation path 24ifndef INSTALL_PATH 25INSTALL_PATH = /usr/local/lib/lv2 26endif 27INSTALLATION_PATH = $(DESTDIR)$(INSTALL_PATH)/tap-$(EFFECT_PATH) 28 29# sources and objects 30SRC = $(wildcard *.c) 31 32## rules 33all: $(PLUGIN_SO) 34 35$(PLUGIN_SO): $(SRC) $(wildcard *.h) ../utils/tap_utils.h 36 $(CC) $(SRC) $(CFLAGS) $(LDFLAGS) -o $(PLUGIN_SO) 37 38clean: 39 $(RM) *.so *.o *~ 40 41install: all 42 mkdir -p $(INSTALLATION_PATH) 43 cp -r *.so *.ttl modgui $(INSTALLATION_PATH) 44