towards makefile-based definitions

This commit is contained in:
Stefano D'Angelo 2024-12-11 20:18:43 +01:00
parent d8323436f1
commit 0782f8b05d
12 changed files with 120 additions and 87 deletions

View File

@ -18,8 +18,17 @@
# File author: Stefano D'Angelo # File author: Stefano D'Angelo
# #
TEMPLATE := cmd
include vars.mk include vars.mk
COMMON_DIR ?= .
DATA_DIR ?= .
PLUGIN_DIR ?= src
MKINC_DIR ?= $(COMMON_DIR)
-include $(MKINC_DIR)/vars-pre.mk
ifeq ($(OS), Windows_NT) ifeq ($(OS), Windows_NT)
EXE_SUFFIX := .exe EXE_SUFFIX := .exe
else else
@ -29,26 +38,25 @@ else
BINDIR := $(PREFIX)/bin BINDIR := $(PREFIX)/bin
endif endif
COMMON_DIR := $(or $(COMMON_DIR),.) TINIWAV_DIR ?= ../tinywav
DATA_DIR := $(or $(DATA_DIR),.) MIDI_PARSER_DIR ?= ../midi-parser
PLUGIN_DIR := $(or $(PLUGIN_DIR),src)
CC := gcc CC := gcc
CXX := g++ CXX := g++
CFLAGS := -O3 -Wall -Wpedantic -Wextra CFLAGS := -O3 -Wall -Wpedantic -Wextra
CFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -I$(TINYWAV_DIR) -I$(MIDI_PARSER_DIR)/include -fPIC $(CFLAGS) $(CFLAGS_EXTRA) CFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -I$(TINYWAV_DIR) -I$(MIDI_PARSER_DIR)/include $(CFLAGS_EXTRA) $(CFLAGS)
LDFLAGS := LDFLAGS :=
LDFLAGS_ALL := $(LDFLAGS) $(LDFLAGS_EXTRA) LDFLAGS_ALL := $(LDFLAGS_EXTRA) $(LDFLAGS)
CXXFLAGS := $(CFLAGS) CXXFLAGS := $(CFLAGS)
CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -I$(TINYWAV_DIR) -I$(MIDI_PARSER_DIR)/include -fPIC $(CXXFLAGS) $(CXXFLAGS_EXTRA) CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -I$(TINYWAV_DIR) -I$(MIDI_PARSER_DIR)/include $(CXXFLAGS_EXTRA) $(CXXFLAGS)
ifeq ($(UNAME_S), Darwin) ifeq ($(UNAME_S), Darwin)
CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64 CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64
LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64 LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64
CXXFLAGS_ALL := $(CXXFLAGS_ALL) -arch arm64 -arch x86_64 CXXFLAGS_ALL := $(CXXFLAGS_ALL) -arch arm64 -arch x86_64
endif endif
PROGRAM := $(BUNDLE_NAME)$(EXE_SUFFIX) PROGRAM := $(BUNDLE_NAME)$(EXE_SUFFIX)
@ -64,7 +72,7 @@ CXX_OBJS := $(addprefix build/obj/, $(notdir $(CXX_SRCS:.cpp=.o)))
ALL := build/$(PROGRAM) ALL := build/$(PROGRAM)
-include $(COMMON_DIR)/vars-extra.mk -include $(MKINC_DIR)/vars-extra.mk
all: $(ALL) all: $(ALL)
@ -92,7 +100,7 @@ install: all
.PHONY: all clean install .PHONY: all clean install
endif endif
-include $(COMMON_DIR)/rules-extra.mk -include $(MKINC_DIR)/rules-extra.mk
.SECONDEXPANSION: .SECONDEXPANSION:
@ -107,4 +115,4 @@ $(C_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$
$(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj $(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj
$(CXX) $^ -o $@ -c $(CXXFLAGS_ALL) $(CXX) $^ -o $@ -c $(CXXFLAGS_ALL)
-include $(COMMON_DIR)/rules-secondexp-extra.mk -include $(MKINC_DIR)/rules-secondexp-extra.mk

View File

@ -20,18 +20,17 @@
BUNDLE_NAME := {{=it.product.bundleName}} BUNDLE_NAME := {{=it.product.bundleName}}
CFLAGS_EXTRA := {{=it.make?.cflags ?? ""}} {{=it.cmd_make?.cflags ?? ""}} {{?(it.cmd_make?.commonDir || it.make?.commonDir)}}
CXXFLAGS_EXTRA := {{=it.make?.cxxflags ?? ""}} {{=it.cmd_make?.cxxflags ?? ""}}
LDFLAGS_EXTRA := {{=it.make?.ldflags ?? ""}} {{=it.cmd_make?.ldflags ?? ""}}
C_SRCS_EXTRA := {{=it.make?.cSrcs ?? ""}} {{=it.cmd_make?.cSrcs ?? ""}}
CXX_SRCS_EXTRA := {{=it.make?.cxxSrcs ?? ""}} {{=it.cmd_make?.cxxSrcs ?? ""}}
COMMON_DIR := {{=it.cmd_make?.commonDir ?? (it.make?.commonDir ?? "")}} COMMON_DIR := {{=it.cmd_make?.commonDir ?? (it.make?.commonDir ?? "")}}
{{?}}
{{?(it.cmd_make?.dataDir || it.make?.dataDir)}}
DATA_DIR := {{=it.cmd_make?.dataDir ?? (it.make?.dataDir ?? "")}} DATA_DIR := {{=it.cmd_make?.dataDir ?? (it.make?.dataDir ?? "")}}
{{?}}
{{?(it.cmd_make?.pluginDir || it.make?.pluginDir)}}
PLUGIN_DIR := {{=it.cmd_make?.pluginDir ?? (it.make?.pluginDir ?? "")}} PLUGIN_DIR := {{=it.cmd_make?.pluginDir ?? (it.make?.pluginDir ?? "")}}
{{?}}
TINYWAV_DIR := {{=it.cmd_make.tinywavDir}} {{?(it.cmd_make?.mkincDir || it.make?.mkincDir)}}
MIDI_PARSER_DIR := {{=it.cmd_make.midiParserDir}} MKINC_DIR := {{=it.cmd_make?.mkincDir ?? (it.make?.mkincDir ?? "")}}
{{?}}
HAS_MIDI_IN := {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length > 0 ? "yes" : "no"}} HAS_MIDI_IN := {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length > 0 ? "yes" : "no"}}

View File

@ -43,6 +43,7 @@ enum {
{{~it.product.parameters :p}} {{~it.product.parameters :p}}
plugin_parameter_{{=p.id}}, plugin_parameter_{{=p.id}},
{{~}} {{~}}
plugin_parameter__count
}; };
{{?}} {{?}}

View File

@ -18,8 +18,17 @@
# File author: Stefano D'Angelo # File author: Stefano D'Angelo
# #
TEMPLATE := lv2
include vars.mk include vars.mk
COMMON_DIR ?= .
DATA_DIR ?= .
PLUGIN_DIR ?= src
MKINC_DIR ?= $(COMMON_DIR)
-include $(MKINC_DIR)/vars-pre.mk
ifeq ($(OS), Windows_NT) ifeq ($(OS), Windows_NT)
DLL_SUFFIX := .dll DLL_SUFFIX := .dll
UI_TYPE := WindowsUI UI_TYPE := WindowsUI
@ -47,23 +56,19 @@ else
endif endif
endif endif
COMMON_DIR := $(or $(COMMON_DIR),.)
DATA_DIR := $(or $(DATA_DIR),.)
PLUGIN_DIR := $(or $(PLUGIN_DIR),src)
CFLAGS := -O3 -Wall -Wpedantic -Wextra CFLAGS := -O3 -Wall -Wpedantic -Wextra
CFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) $(shell pkg-config --cflags lv2) -fPIC $(CFLAGS) $(CFLAGS_EXTRA) CFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) $(shell pkg-config --cflags lv2) -fPIC $(CFLAGS_EXTRA) $(CFLAGS)
LDFLAGS := LDFLAGS :=
LDFLAGS_ALL := -shared $(shell pkg-config --libs lv2) $(LDFLAGS) $(LDFLAGS_EXTRA) LDFLAGS_ALL := -shared $(shell pkg-config --libs lv2) $(LDFLAGS_EXTRA) $(LDFLAGS)
CXXFLAGS := $(CFLAGS) CXXFLAGS := $(CFLAGS)
CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -fPIC $(CXXFLAGS) $(CXXFLAGS_EXTRA) CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -fPIC $(CXXFLAGS_EXTRA) $(CXXFLAGS)
ifeq ($(UNAME_S), Darwin) ifeq ($(UNAME_S), Darwin)
CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64 CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64
LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64 LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64
CXXFLAGS_ALL := $(CXXFLAGS_ALL) -arch arm64 -arch x86_64 CXXFLAGS_ALL := $(CXXFLAGS_ALL) -arch arm64 -arch x86_64
endif endif
BUNDLE_DIR := $(BUNDLE_NAME).lv2 BUNDLE_DIR := $(BUNDLE_NAME).lv2
@ -78,7 +83,7 @@ CXX_OBJS := $(addprefix build/obj/, $(notdir $(CXX_SRCS:.cpp=.o)))
ALL := build/$(BUNDLE_DIR)/manifest.ttl build/$(BUNDLE_DIR)/$(DLL_FILE) ALL := build/$(BUNDLE_DIR)/manifest.ttl build/$(BUNDLE_DIR)/$(DLL_FILE)
-include $(COMMON_DIR)/vars-extra.mk -include $(MKINC_DIR)/vars-extra.mk
all: $(ALL) all: $(ALL)
@ -127,7 +132,7 @@ install-user: all
install -m $$m $$f "$(LV2DIR_USER)/$$d"; \ install -m $$m $$f "$(LV2DIR_USER)/$$d"; \
done done
-include $(COMMON_DIR)/rules-extra.mk -include $(MKINC_DIR)/rules-extra.mk
.PHONY: all clean install install-user .PHONY: all clean install install-user
@ -141,4 +146,4 @@ $(C_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$
$(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj $(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj
$(CXX) $^ -o $@ -c $(CXXFLAGS_ALL) $(CXX) $^ -o $@ -c $(CXXFLAGS_ALL)
-include $(COMMON_DIR)/rules-secondexp-extra.mk -include $(MKINC_DIR)/rules-secondexp-extra.mk

View File

@ -20,13 +20,15 @@
BUNDLE_NAME := {{=it.product.bundleName}} BUNDLE_NAME := {{=it.product.bundleName}}
CFLAGS_EXTRA := {{=it.make?.cflags ?? ""}} {{=it.lv2_make?.cflags ?? ""}} {{?(it.lv2_make?.commonDir || it.make?.commonDir)}}
CXXFLAGS_EXTRA := {{=it.make?.cxxflags ?? ""}} {{=it.lv2_make?.cxxflags ?? ""}}
LDFLAGS_EXTRA := {{=it.make?.ldflags ?? ""}} {{=it.lv2_make?.ldflags ?? ""}}
C_SRCS_EXTRA := {{=it.make?.cSrcs ?? ""}} {{=it.lv2_make?.cSrcs ?? ""}}
CXX_SRCS_EXTRA := {{=it.make?.cxxSrcs ?? ""}} {{=it.lv2_make?.cxxSrcs ?? ""}}
COMMON_DIR := {{=it.lv2_make?.commonDir ?? (it.make?.commonDir ?? "")}} COMMON_DIR := {{=it.lv2_make?.commonDir ?? (it.make?.commonDir ?? "")}}
{{?}}
{{?(it.lv2_make?.dataDir || it.make?.dataDir)}}
DATA_DIR := {{=it.lv2_make?.dataDir ?? (it.make?.dataDir ?? "")}} DATA_DIR := {{=it.lv2_make?.dataDir ?? (it.make?.dataDir ?? "")}}
{{?}}
{{?(it.lv2_make?.pluginDir || it.make?.pluginDir)}}
PLUGIN_DIR := {{=it.lv2_make?.pluginDir ?? (it.make?.pluginDir ?? "")}} PLUGIN_DIR := {{=it.lv2_make?.pluginDir ?? (it.make?.pluginDir ?? "")}}
{{?}}
{{?(it.lv2_make?.mkincDir || it.make?.mkincDir)}}
MKINC_DIR := {{=it.lv2_make?.mkincDir ?? (it.make?.mkincDir ?? "")}}
{{?}}

View File

@ -18,8 +18,17 @@
# File author: Stefano D'Angelo # File author: Stefano D'Angelo
# #
TEMPLATE := vst3
include vars.mk include vars.mk
COMMON_DIR ?= .
DATA_DIR ?= .
PLUGIN_DIR ?= src
MKINC_DIR ?= $(COMMON_DIR)
-include $(MKINC_DIR)/vars-pre.mk
ifeq ($(OS), Windows_NT) ifeq ($(OS), Windows_NT)
DLL_SUFFIX := .vst3 DLL_SUFFIX := .vst3
PLATFORM := x86_64-win PLATFORM := x86_64-win
@ -46,36 +55,32 @@ else
endif endif
endif endif
COMMON_DIR := $(or $(COMMON_DIR),.)
DATA_DIR := $(or $(DATA_DIR),.)
PLUGIN_DIR := $(or $(PLUGIN_DIR),src)
CFLAGS := -O3 -Wall -Wpedantic -Wextra CFLAGS := -O3 -Wall -Wpedantic -Wextra
CFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -fPIC $(CFLAGS) $(CFLAGS_EXTRA) CFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -fPIC $(CFLAGS_EXTRA) $(CFLAGS)
LDFLAGS := LDFLAGS :=
LDFLAGS_ALL := -shared -lm $(LDFLAGS) $(LDFLAGS_EXTRA) LDFLAGS_ALL := -shared -lm $(LDFLAGS_EXTRA) $(LDFLAGS)
CXXFLAGS := $(CFLAGS) CXXFLAGS := $(CFLAGS)
CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -fPIC $(CXXFLAGS) $(CXXFLAGS_EXTRA) CXXFLAGS_ALL := -I$(DATA_DIR)/src -I$(PLUGIN_DIR) -fPIC $(CXXFLAGS_EXTRA) $(CXXFLAGS)
ifeq ($(UNAME_S), Darwin) ifeq ($(UNAME_S), Darwin)
CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64 CFLAGS_ALL := $(CFLAGS_ALL) -arch arm64 -arch x86_64
LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64 LDFLAGS_ALL := $(LDFLAGS_ALL) -arch arm64 -arch x86_64
CXXFLAGS_ALL := $(CXXFLAGS_ALL) -arch arm64 -arch x86_64 CXXFLAGS_ALL := $(CXXFLAGS_ALL) -arch arm64 -arch x86_64
ifeq ($(HAS_UI), yes) ifeq ($(HAS_UI), yes)
LDFLAGS_ALL := $(LDFLAGS_ALL) -Wl,-framework,Foundation -Wl,-framework,Cocoa -Wl,-framework,Corevideo LDFLAGS_ALL := $(LDFLAGS_ALL) -Wl,-framework,Foundation -Wl,-framework,Cocoa -Wl,-framework,Corevideo
endif endif
endif endif
ifeq ($(UNAME_S), Linux) ifeq ($(UNAME_S), Linux)
CFLAGS_ALL := $(CFLAGS_ALL) -D_GNU_SOURCE CFLAGS_ALL := $(CFLAGS_ALL) -D_GNU_SOURCE
LDFLAGS_ALL := $(LDFLAGS_ALL) -ldl LDFLAGS_ALL := $(LDFLAGS_ALL) -ldl
ifeq ($(HAS_UI), yes) ifeq ($(HAS_UI), yes)
CFLAGS_ALL := $(CFLAGS_ALL) $(shell pkg-config --cflags x11) CFLAGS_ALL := $(CFLAGS_ALL) $(shell pkg-config --cflags x11)
LDFLAGS_ALL := $(LDFLAGS_ALL) $(shell pkg-config --libs x11) LDFLAGS_ALL := $(LDFLAGS_ALL) $(shell pkg-config --libs x11)
CXXFLAGS_ALL := $(CXXFLAGS_ALL) $(shell pkg-config --cflags x11) CXXFLAGS_ALL := $(CXXFLAGS_ALL) $(shell pkg-config --cflags x11)
endif endif
endif endif
BUNDLE_DIR := $(BUNDLE_NAME).vst3 BUNDLE_DIR := $(BUNDLE_NAME).vst3
@ -95,7 +100,7 @@ ifeq ($(UNAME_S), Darwin)
ALL := $(ALL) build/$(BUNDLE_DIR)/Contents/Info.plist build/$(BUNDLE_DIR)/Contents/PkgInfo ALL := $(ALL) build/$(BUNDLE_DIR)/Contents/Info.plist build/$(BUNDLE_DIR)/Contents/PkgInfo
endif endif
-include $(COMMON_DIR)/vars-extra.mk -include $(MKINC_DIR)/vars-extra.mk
all: $(ALL) all: $(ALL)
@ -149,7 +154,7 @@ install-user: all
install -m $$m $$f "$(VST3DIR_USER)/$$d"; \ install -m $$m $$f "$(VST3DIR_USER)/$$d"; \
done done
-include $(COMMON_DIR)/rules-extra.mk -include $(MKINC_DIR)/rules-extra.mk
.PHONY: all clean install install-user .PHONY: all clean install install-user
@ -163,4 +168,4 @@ $(C_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).c,$$
$(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj $(CXX_OBJS): build/obj/%.o: $$(filter $$(PERCENT)/$$(basename $$(notdir $$@)).cpp,$$(CXX_SRCS)) | build/obj
$(CXX) $^ -o $@ -c $(CXXFLAGS_ALL) $(CXX) $^ -o $@ -c $(CXXFLAGS_ALL)
-include $(COMMON_DIR)/rules-secondexp-extra.mk -include $(MKINC_DIR)/rules-secondexp-extra.mk

View File

@ -20,15 +20,17 @@
BUNDLE_NAME := {{=it.product.bundleName}} BUNDLE_NAME := {{=it.product.bundleName}}
CFLAGS_EXTRA := {{=it.make?.cflags ?? ""}} {{=it.vst3_make?.cflags ?? ""}} {{?(it.vst3_make?.commonDir || it.make?.commonDir)}}
CXXFLAGS_EXTRA := {{=it.make?.cxxflags ?? ""}} {{=it.vst3_make?.cxxflags ?? ""}}
LDFLAGS_EXTRA := {{=it.make?.ldflags ?? ""}} {{=it.vst3_make?.ldflags ?? ""}}
C_SRCS_EXTRA := {{=it.make?.cSrcs ?? ""}} {{=it.vst3_make?.cSrcs ?? ""}}
CXX_SRCS_EXTRA := {{=it.make?.cxxSrcs ?? ""}} {{=it.vst3_make?.cxxSrcs ?? ""}}
COMMON_DIR := {{=it.vst3_make?.commonDir ?? (it.make?.commonDir ?? "")}} COMMON_DIR := {{=it.vst3_make?.commonDir ?? (it.make?.commonDir ?? "")}}
{{?}}
{{?(it.vst3_make?.dataDir || it.make?.dataDir)}}
DATA_DIR := {{=it.vst3_make?.dataDir ?? (it.make?.dataDir ?? "")}} DATA_DIR := {{=it.vst3_make?.dataDir ?? (it.make?.dataDir ?? "")}}
{{?}}
{{?(it.vst3_make?.pluginDir || it.make?.pluginDir)}}
PLUGIN_DIR := {{=it.vst3_make?.pluginDir ?? (it.make?.pluginDir ?? "")}} PLUGIN_DIR := {{=it.vst3_make?.pluginDir ?? (it.make?.pluginDir ?? "")}}
{{?}}
{{?(it.vst3_make?.mkincDir || it.make?.mkincDir)}}
MKINC_DIR := {{=it.vst3_make?.mkincDir ?? (it.make?.mkincDir ?? "")}}
{{?}}
HAS_UI := {{=it.product.ui ? "yes" : "no"}} HAS_UI := {{=it.product.ui ? "yes" : "no"}}

View File

@ -1,6 +0,0 @@
{
"cmd_make": {
"tinywavDir": "../../../tinywav",
"midiParserDir": "../../../midi-parser"
}
}

5
test/make.json Normal file
View File

@ -0,0 +1,5 @@
{
"make": {
"mkincDir": "../mk"
}
}

View File

@ -1,14 +1,18 @@
#!/bin/sh #!/bin/sh
dir=`dirname $0` dir=`dirname $0`
mkdir -p $dir/../out/mk
cp $dir/vars-pre.mk $dir/../out/mk
$dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/vst3 $dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/vst3
$dir/../tibia $dir/product.json,$dir/company.json,$dir/vst3.json $dir/../templates/vst3 $dir/../out/vst3 $dir/../tibia $dir/product.json,$dir/company.json,$dir/vst3.json $dir/../templates/vst3 $dir/../out/vst3
$dir/../tibia $dir/product.json,$dir/company.json,$dir/vst3.json,$dir/vst3-make.json $dir/../templates/vst3-make $dir/../out/vst3 $dir/../tibia $dir/product.json,$dir/company.json,$dir/vst3.json,$dir/make.json $dir/../templates/vst3-make $dir/../out/vst3
cp $dir/plugin.h $dir/plugin_ui.h $dir/../out/vst3/src cp $dir/plugin.h $dir/plugin_ui.h $dir/../out/vst3/src
$dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/lv2 $dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/lv2
$dir/../tibia $dir/product.json,$dir/company.json,$dir/lv2.json $dir/../templates/lv2 $dir/../out/lv2 $dir/../tibia $dir/product.json,$dir/company.json,$dir/lv2.json $dir/../templates/lv2 $dir/../out/lv2
$dir/../tibia $dir/product.json,$dir/company.json,$dir/lv2.json,$dir/lv2-make.json $dir/../templates/lv2-make $dir/../out/lv2 $dir/../tibia $dir/product.json,$dir/company.json,$dir/lv2.json,$dir/make.json $dir/../templates/lv2-make $dir/../out/lv2
cp $dir/plugin.h $dir/plugin_ui.h $dir/../out/lv2/src cp $dir/plugin.h $dir/plugin_ui.h $dir/../out/lv2/src
$dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/web $dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/web
@ -30,7 +34,7 @@ cp $dir/plugin.h $dir/../out/ios/src
$dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/cmd $dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/cmd
$dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/cmd $dir/../out/cmd $dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/cmd $dir/../out/cmd
$dir/../tibia $dir/product.json,$dir/company.json,$dir/cmd-make.json $dir/../templates/cmd-make $dir/../out/cmd $dir/../tibia $dir/product.json,$dir/company.json,$dir/make.json $dir/../templates/cmd-make $dir/../out/cmd
cp $dir/plugin.h $dir/../out/cmd/src cp $dir/plugin.h $dir/../out/cmd/src
$dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/daisy-seed $dir/../tibia $dir/product.json,$dir/company.json $dir/../templates/common $dir/../out/daisy-seed

14
test/vars-pre.mk Normal file
View File

@ -0,0 +1,14 @@
ifeq ($(TEMPLATE), cmd)
TINYWAV_DIR := ../../../tinywav
MIDI_PARSER_DIR := ../../../midi-parser
endif
ifeq ($(TEMPLATE), lv2)
CFLAGS_EXTRA := $(shell pkg-config --cflags pugl-cairo-0 pugl-0 cairo)
LDFLAGS_EXTRA := $(shell pkg-config --libs pugl-cairo-0 pugl-0 cairo) -Wl,-rpath,$(shell pkg-config --variable=libdir pugl-cairo-0),-rpath,$(shell pkg-config --variable=libdir pugl-0),-rpath,$(shell pkg-config --variable=libdir cairo)
endif
ifeq ($(TEMPLATE), vst3)
CFLAGS_EXTRA := -I../../../vst3_c_api $(shell pkg-config --cflags pugl-cairo-0)
LDFLAGS_EXTRA := $(shell pkg-config --libs pugl-cairo-0 pugl-0 cairo) -Wl,-rpath,$(shell pkg-config --variable=libdir pugl-cairo-0),-rpath,$(shell pkg-config --variable=libdir pugl-0),-rpath,$(shell pkg-config --variable=libdir cairo)
endif

View File

@ -1,6 +0,0 @@
{
"vst3_make": {
"cflags": "-I../../../vst3_c_api $(shell pkg-config --cflags pugl-cairo-0)",
"ldflags": "$(shell pkg-config --libs pugl-cairo-0 pugl-0 cairo) -Wl,-rpath,$(shell pkg-config --variable=libdir pugl-cairo-0),-rpath,$(shell pkg-config --variable=libdir pugl-0),-rpath,$(shell pkg-config --variable=libdir cairo)"
}
}