summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-12-26 21:12:38 +1100
committerDamien Zammit <damien@zamaudio.com>2019-12-26 21:12:38 +1100
commite2bfdea7984b107228ca367813bcf6191d770d5b (patch)
tree5095fc290cf148c28b4096248356ac8d68527603
parentc7c085f57f7a65d411d755c1e180d6efa91f51b1 (diff)
aurez fixups
-rw-r--r--Makefile8
-rw-r--r--Makefile.plugins.mk49
-rw-r--r--examples/Parameters/DistrhoPluginInfo.h3
-rw-r--r--utils/aurez/Makefile7
4 files changed, 19 insertions, 48 deletions
diff --git a/Makefile b/Makefile
index 70b8cc72..6fdfd983 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@
include Makefile.base.mk
-all: dgl examples gen
+all: dgl gen
# --------------------------------------------------------------
@@ -37,12 +37,15 @@ ifneq ($(MACOS_OR_WINDOWS),true)
endif
ifneq ($(CROSS_COMPILING),true)
-gen: examples utils/lv2_ttl_generator
+gen: examples utils/lv2_ttl_generator utils/AuRez
@$(CURDIR)/utils/generate-ttl.sh
ifeq ($(MACOS),true)
@$(CURDIR)/utils/generate-vst-bundles.sh
endif
+utils/AuRez:
+ $(MAKE) -C utils/aurez
+
utils/lv2_ttl_generator:
$(MAKE) -C utils/lv2-ttl-generator
else
@@ -62,6 +65,7 @@ clean:
$(MAKE) clean -C examples/Parameters
$(MAKE) clean -C examples/States
$(MAKE) clean -C utils/lv2-ttl-generator
+ $(MAKE) clean -C utils/aurez
rm -rf bin build
# --------------------------------------------------------------
diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk
index 5214079f..07889472 100644
--- a/Makefile.plugins.mk
+++ b/Makefile.plugins.mk
@@ -108,21 +108,21 @@ ifneq ($(CROSS_COMPILING),true)
ifeq ($(shell echo ${CXXFLAGS} | grep -q -- -arch && echo true),true)
ifeq ($(shell echo ${CXXFLAGS} | grep -q -- x86_64 && echo true),true)
-REZ_FLAGS += -arch x86_64 -d x86_64_YES
+REZ_FLAGS += --arch x86_64
endif
ifeq ($(shell echo ${CXXFLAGS} | grep -q -- i386 && echo true),true)
-REZ_FLAGS += -arch i386 -d i386_YES
+REZ_FLAGS += --arch i386
endif
else # No "-arch" in environment, automatically detect arch
ifeq ($(shell gcc -dM -E - < /dev/null | grep -q -- __x86_64__ && echo true),true)
-REZ_FLAGS += -arch x86_64 -d x86_64_YES
+REZ_FLAGS += --arch x86_64
endif
ifeq ($(shell gcc -dM -E - < /dev/null | grep -q -- __i386__ && echo true),true)
-REZ_FLAGS += -arch i386 -d i386_YES
+REZ_FLAGS += --arch i386
endif
endif # CXXFLAGS
@@ -318,11 +318,7 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# AU
-ifneq ($(CROSS_COMPILING),true)
au: $(au_plugin) $(au_pkginfo) $(au_plist) $(au_ui) $(au_uiplist) $(au_rsrc)
-else
-au: $(au_plugin) $(au_pkginfo) $(au_plist) $(au_ui) $(au_uiplist)
-endif
$(au_plugin): $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginMain_AU.cpp.o
-@mkdir -p $(shell dirname $@)
@@ -349,40 +345,13 @@ $(au_uiplist):
@echo "Creating AU UI Info.plist for $(NAME)"
sed -e "s/X-DPF-EXECUTABLE-DPF-X/$(NAME)/g" $(DPF_PATH)/distrho/src/CocoaUI/Info.plist > $@
-$(au_rsrc): $(BUILD_DIR)/step2.rsrc
- -@mkdir -p $(shell dirname $@)
- @echo "Creating AU rsrc for $(NAME) (part 3/3)"
- ResMerger $< -dstIs DF -o $@
-
-$(BUILD_DIR)/step2.rsrc: $(BUILD_DIR)/step1.rsrc
+$(au_rsrc):
-@mkdir -p $(shell dirname $@)
- @echo "Creating AU rsrc for $(NAME) (part 2/3)"
- ResMerger -dstIs DF $< -o $@
-
-$(BUILD_DIR)/step1.rsrc: $(DPF_PATH)/distrho/src/DistrhoPluginAU.r $(BUILD_DIR)/DistrhoPluginInfo.r $(OBJS_DSP)
- -@mkdir -p $(shell dirname $@)
- @echo "Creating AU rsrc for $(NAME) (part 1/3)"
- Rez $< \
- -d SystemSevenOrLater=1 \
- -useDF -script Roman \
- -i . \
- -i $(BUILD_DIR) \
- -i $(DPF_PATH)/distrho/src/CoreAudio106/AudioUnits/AUPublic \
- -i $(DPF_PATH)/distrho/src/CoreAudio106/AudioUnits/AUPublic/AUBase \
- -i $(DPF_PATH)/distrho/src/CoreAudio106/AudioUnits/AUPublic/OtherBases \
- -i $(DPF_PATH)/distrho/src/CoreAudio106/AudioUnits/AUPublic/Utility \
- -i $(DPF_PATH)/distrho/src/CoreAudio106/PublicUtility \
- -I /Developer/SDKs/MacOSX10.6.sdk \
- -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers \
+ @echo "Creating AU rsrc for $(NAME)"
+ $(DPF_PATH)/utils/AuRez aufx fxfx 'dpf ' \
$(REZ_FLAGS) \
- -o $@
-
-$(BUILD_DIR)/DistrhoPluginInfo.r: $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginAUexport.cpp.o
- -@mkdir -p $(shell dirname $@)
- @echo "Creating DistrhoPluginInfo.r for $(NAME)"
- $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $(BUILD_DIR)/DistrhoPluginInfoGenerator && \
- $(BUILD_DIR)/DistrhoPluginInfoGenerator "$(BUILD_DIR)" && \
- rm $(BUILD_DIR)/DistrhoPluginInfoGenerator
+ -o $@ -M dpf -P $(NAME) -V 0.0.0 \
+ -e _PluginAUEntry -v _PluginAU_CocoaUI
$(BUILD_DIR)/PluginAU_CocoaUI.mm.o: $(DPF_PATH)/distrho/src/CocoaUI/PluginAU_CocoaUI.m
-@mkdir -p $(shell dirname $@)
diff --git a/examples/Parameters/DistrhoPluginInfo.h b/examples/Parameters/DistrhoPluginInfo.h
index a9908812..7fbe74e9 100644
--- a/examples/Parameters/DistrhoPluginInfo.h
+++ b/examples/Parameters/DistrhoPluginInfo.h
@@ -27,9 +27,6 @@
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1
-// FIXME
-#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1
-
#define DISTRHO_PLUGIN_AU_SUBTYPE 'prms'
#define DISTRHO_PLUGIN_AU_MANUF 'dpf '
diff --git a/utils/aurez/Makefile b/utils/aurez/Makefile
index 122a2615..9346c440 100644
--- a/utils/aurez/Makefile
+++ b/utils/aurez/Makefile
@@ -1,12 +1,12 @@
PREFIX ?= /usr/local
CXX ?= g++
-CXXFLAGS ?= -O2 -g -Wall -std=c++11
-LDFLAGS ?=
+CXXFLAGS ?= -O2 -g -Wall -std=c++11 -static
+LDFLAGS ?= -static
all: bin/AuRez
clean:
- rm -rf bin obj
+ rm -rf bin obj ../AuRez
install: all
install -D -m 755 bin/AuRez $(DESTDIR)$(PREFIX)/bin/AuRez
@@ -20,6 +20,7 @@ obj/%.o: %.cc
bin/AuRez: obj/AuRez.o obj/AuRsrc.o obj/MacRsrc.o
@mkdir -p bin
$(CXX) $(LDFLAGS) -o $@ $^
+ @cp bin/AuRez ..
AuRez.cc: AuRsrc.h MacRsrc.h
AuRsrc.cc: AuRsrc.h