updated lv2
This commit is contained in:
parent
8164e38005
commit
069d84170d
@ -21,8 +21,12 @@ 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 = -fPIC ${CFLAGS} ${CFLAGS_EXTRA}
|
CFLAGS_ALL = -I${DATA_DIR}/src -I${PLUGIN_DIR} -fPIC ${CFLAGS} ${CFLAGS_EXTRA}
|
||||||
|
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LDFLAGS_ALL = -shared ${LDFLAGS} ${LDFLAGS_EXTRA}
|
LDFLAGS_ALL = -shared ${LDFLAGS} ${LDFLAGS_EXTRA}
|
||||||
@ -33,7 +37,7 @@ DLL_FILE = ${BUNDLE_NAME}${DLL_SUFFIX}
|
|||||||
|
|
||||||
all: build/${BUNDLE_DIR}/manifest.ttl build/${BUNDLE_DIR}/${DLL_FILE}
|
all: build/${BUNDLE_DIR}/manifest.ttl build/${BUNDLE_DIR}/${DLL_FILE}
|
||||||
|
|
||||||
build/${BUNDLE_DIR}/manifest.ttl: data/manifest.ttl.in | build/${BUNDLE_DIR}
|
build/${BUNDLE_DIR}/manifest.ttl: ${DATA_DIR}/data/manifest.ttl.in | build/${BUNDLE_DIR}
|
||||||
cat $^ | sed s/@DLL_SUFFIX@/${DLL_SUFFIX}/g > $@
|
cat $^ | sed s/@DLL_SUFFIX@/${DLL_SUFFIX}/g > $@
|
||||||
|
|
||||||
ifeq ($(UNAME_S), Darwin)
|
ifeq ($(UNAME_S), Darwin)
|
||||||
@ -41,19 +45,19 @@ ifeq ($(UNAME_S), Darwin)
|
|||||||
build/${BUNDLE_DIR}/${DLL_FILE}: build/tmp/x86_64 build/tmp/arm64 | build/${BUNDLE_DIR}
|
build/${BUNDLE_DIR}/${DLL_FILE}: build/tmp/x86_64 build/tmp/arm64 | build/${BUNDLE_DIR}
|
||||||
lipo -create -output $@ $^
|
lipo -create -output $@ $^
|
||||||
|
|
||||||
build/tmp/x86_64: src/lv2.c src/data.h src/plugin.h | build/tmp
|
build/tmp/x86_64: ${COMMON_DIR}/src/lv2.c ${DATA_DIR}/src/data.h ${PLUGIN_DIR}/plugin.h | build/tmp
|
||||||
${CC} src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch x86_64
|
${CC} ${COMMON_DIR}/src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch x86_64
|
||||||
|
|
||||||
build/tmp/arm64: src/lv2.c src/data.h src/plugin.h | build/tmp
|
build/tmp/arm64: ${COMMON_DIR}/src/lv2.c ${DATA_DIR}/src/data.h ${PLUGIN_DIR}/plugin.h | build/tmp
|
||||||
${CC} src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch arm64
|
${CC} ${COMMON_DIR}/src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL} -arch arm64
|
||||||
|
|
||||||
build/tmp:
|
build/tmp:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
build/${BUNDLE_DIR}/${DLL_FILE}: src/lv2.c src/data.h | build/${BUNDLE_DIR}
|
build/${BUNDLE_DIR}/${DLL_FILE}: ${COMMON_DIR}/src/lv2.c ${DATA_DIR}/src/data.h ${PLUGIN_DIR}/plugin.h | build/${BUNDLE_DIR}
|
||||||
${CC} src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL}
|
${CC} ${COMMON_DIR}/src/lv2.c -o $@ ${CFLAGS_ALL} ${LDFLAGS_ALL}
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
BUNDLE_NAME := {{=it.product.bundleName}}
|
BUNDLE_NAME := {{=it.product.bundleName}}
|
||||||
CFLAGS_EXTRA := {{=it.make && it.make.cflags ? it.make.cflags : ""}} {{=it.lv2_make && it.lv2_make.cflags ? it.lv2_make.cflags : ""}}
|
CFLAGS_EXTRA := {{=it.make && it.make.cflags ? it.make.cflags : ""}} {{=it.lv2_make && it.lv2_make.cflags ? it.lv2_make.cflags : ""}}
|
||||||
LDFLAGS_EXTRA := {{=it.make && it.make.ldflags ? it.make.ldflags : ""}} {{=it.lv2_make && it.lv2_make.ldflags ? it.lv2_make.ldflags : ""}}
|
LDFLAGS_EXTRA := {{=it.make && it.make.ldflags ? it.make.ldflags : ""}} {{=it.lv2_make && it.lv2_make.ldflags ? it.lv2_make.ldflags : ""}}
|
||||||
|
COMMON_DIR := {{=it.lv2_make && it.lv2_make.commonDir ? it.lv2_make.commonDir : (it.make && it.make.commonDir ? it.make.commonDir : "")}}
|
||||||
|
DATA_DIR := {{=it.lv2_make && it.lv2_make.dataDir ? it.lv2_make.dataDir : (it.make && it.make.dataDir ? it.make.dataDir : "")}}
|
||||||
|
PLUGIN_DIR := {{=it.lv2_make && it.lv2_make.pluginDir ? it.lv2_make.pluginDir : (it.make && it.make.pluginDir ? it.make.pluginDir : "")}}
|
||||||
|
@ -71,6 +71,8 @@ static LV2_Handle instantiate(const struct LV2_Descriptor * descriptor, double s
|
|||||||
}
|
}
|
||||||
|
|
||||||
instance->uri_midi_MidiEvent = instance->map->map(instance->map->handle, LV2_MIDI__MidiEvent);
|
instance->uri_midi_MidiEvent = instance->map->map(instance->map->handle, LV2_MIDI__MidiEvent);
|
||||||
|
#else
|
||||||
|
(void)features;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
plugin_init(&instance->p);
|
plugin_init(&instance->p);
|
||||||
@ -230,6 +232,8 @@ static void run(LV2_Handle instance, uint32_t sample_count) {
|
|||||||
if (i->c[k] != NULL)
|
if (i->c[k] != NULL)
|
||||||
*i->c[k] = plugin_get_parameter(&i->p, k);
|
*i->c[k] = plugin_get_parameter(&i->p, k);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)plugin_get_parameter;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
var path = require("path");
|
var path = require("path");
|
||||||
var sep = path.sep;
|
var sep = path.sep;
|
||||||
|
|
||||||
module.exports = function (data, api) {
|
module.exports = function (data, api, outputCommon, outputData) {
|
||||||
|
if (outputData) {
|
||||||
data.tibia.lv2 = {
|
data.tibia.lv2 = {
|
||||||
prefixes: [
|
prefixes: [
|
||||||
{ id: "atom", uri: "http://lv2plug.in/ns/ext/atom#" },
|
{ id: "atom", uri: "http://lv2plug.in/ns/ext/atom#" },
|
||||||
@ -100,6 +101,7 @@ module.exports = function (data, api) {
|
|||||||
}
|
}
|
||||||
ports.sort((a, b) => a.direction != b.direction ? (a.direction == "input" ? -1 : 1) : 0);
|
ports.sort((a, b) => a.direction != b.direction ? (a.direction == "input" ? -1 : 1) : 0);
|
||||||
data.tibia.lv2.ports.push.apply(data.tibia.lv2.ports, ports);
|
data.tibia.lv2.ports.push.apply(data.tibia.lv2.ports, ports);
|
||||||
|
}
|
||||||
|
|
||||||
api.generateFileFromTemplateFile(`data${sep}manifest.ttl.in`, `data${sep}manifest.ttl.in`, data);
|
api.generateFileFromTemplateFile(`data${sep}manifest.ttl.in`, `data${sep}manifest.ttl.in`, data);
|
||||||
api.copyFile(`src${sep}lv2.c`, `src${sep}lv2.c`);
|
api.copyFile(`src${sep}lv2.c`, `src${sep}lv2.c`);
|
||||||
|
Loading…
Reference in New Issue
Block a user