-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
58 lines (42 loc) · 1.81 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
51
52
53
54
55
56
57
58
#!/usr/bin/make -f
# Makefile for hvcc-plugins #
# ------------------------- #
# Created by falkTX
#
include dpf/Makefile.base.mk
# ---------------------------------------------------------------------------------------------------------------------
# helper macros
PLUGINS = $(subst plugins/,,$(wildcard plugins/*))
CUSTOM_TTL = $(subst custom-ttl/,,$(wildcard custom-ttl/*))
MODGUIS = $(subst custom-ttl/,,$(subst /modgui,,$(wildcard custom-ttl/*/modgui)))
# ---------------------------------------------------------------------------------------------------------------------
# build rules
all: pregen
$(foreach p,$(CUSTOM_TTL),cp custom-ttl/${p}/*.ttl bin/$(lastword $(subst -, ,${p})).lv2/;)
$(foreach p,$(MODGUIS),cp -r custom-ttl/${p}/modgui bin/$(lastword $(subst -, ,${p})).lv2/;)
pregen: plugins dpf/utils/lv2_ttl_generator$(APP_EXT)
@$(CURDIR)/dpf/utils/generate-ttl.sh
plugins: $(PLUGINS:%=build/%/dpf) $(PLUGINS:%=build/%/dpf-widgets) $(PLUGINS:%=build/%/Makefile)
$(foreach p,$(PLUGINS),$(MAKE) DPF_PATH=$(CURDIR)/dpf DPF_TARGET_DIR=$(CURDIR)/bin -C build/${p} plugin;)
build/%/dpf: dpf
-@mkdir -p build/$*
ln -s $(abspath $<) $@
build/%/dpf-widgets: dpf-widgets
-@mkdir -p build/$*
ln -s $(abspath $<) $@
build/%/Makefile: plugins/%/plugin.json plugins/%/plugin.pd
hvcc \
plugins/$*/plugin.pd \
-m plugins/$*/plugin.json \
-n "$(lastword $(subst -, ,$*))" \
-g dpf \
-o $(@D)
dpf/utils/lv2_ttl_generator$(APP_EXT):
$(MAKE) -C dpf/utils/lv2-ttl-generator
# ---------------------------------------------------------------------------------------------------------------------
# cleanup
clean:
$(MAKE) clean -C dpf/utils/lv2-ttl-generator
rm -rf bin build hvcc/build
# ---------------------------------------------------------------------------------------------------------------------
.PHONY: plugins