-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (37 loc) · 1.03 KB
/
Makefile
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
44
45
46
47
48
49
50
CC ?= gcc
CXX ?= g++
PREFIX ?=
SYSPATH ?=/lib/lv2
_FLAGS ?= -Wall -Wextra -O3 -Wno-unused-parameter
CFLAGS += $(_FLAGS) -fPIC -std=c99
CXXFLAGS += $(_FLAGS) -fPIC -std=c++11
NAME = midi-display
.ONESHELL:
all: build
build: $(NAME).so
$(NAME).so: build/$(NAME).c.o
$(CC) $^ $(LDFLAGS) -shared -Wl,--no-undefined -o $@
build/$(NAME).c.o: $(NAME).c
mkdir -p build
$(CC) $< $(CFLAGS) -c -o $@
clean:
rm -rf build
rm -f *.so
validate:
find | grep \\.ttl | xargs sord_validate
package:
mkdir -p build/$(NAME).lv2
install -m 644 *.so build/$(NAME).lv2/
install -m 644 *.ttl build/$(NAME).lv2/
cp -rv modgui build/$(NAME).lv2/
deploy: package
cd build
tar cz ${NAME}.lv2 | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install
install-user: package
install -d ~/.lv2/$(NAME).lv2
cp -rv build/${NAME}.lv2 ~/.lv2/
install: package
# $(DESTDIR)$(PREFIX) is needed for Mod
# $(SYSPATH) default value is needed for Mod
install -d $(DESTDIR)$(PREFIX)$(SYSPATH)/$(NAME).lv2
cp -rv build/${NAME}.lv2 $(DESTDIR)$(PREFIX)$(SYSPATH)