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