Skip to content

Commit 301e6ed

Browse files
committed
Get basic plugin system working on mac
1 parent b04a0b7 commit 301e6ed

7 files changed

Lines changed: 3893 additions & 2882 deletions

File tree

Builds/MacOSX/Makefile.plugins

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Automatically generated makefile, created by the Introjucer
2+
# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
3+
4+
# (this disables dependency generation if multiple architectures are set)
5+
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
6+
7+
PLUGIN_DIR := ../../Source/Plugins
8+
9+
ifndef CONFIG
10+
CONFIG=Debug
11+
endif
12+
13+
ifeq ($(CONFIG),Debug)
14+
BINDIR := $(CURDIR)/build
15+
LIBDIR := $(CURDIR)/build
16+
OBJDIR := $(CURDIR)/build/intermediate/plugins/Debug
17+
OUTDIR := $(CURDIR)/build/Debug/plugins
18+
19+
ifeq ($(TARGET_ARCH),)
20+
TARGET_ARCH := -march=native
21+
endif
22+
23+
CPPFLAGS := $(DEPFLAGS) -D "DEBUG=1" -D "_DEBUG=1" -D "OEPLUGIN" -D "JUCER_XCODE_MAC_F6D2F4CF=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I $(CURDIR)../../JuceLibraryCode -I $(CURDIR)../../JuceLibraryCode/modules
24+
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O3 -g -std=c++0x -fPIC
25+
CXXFLAGS += $(CFLAGS)
26+
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -ldl -lpthread -ldl -fPIC -rdynamic -dynamiclib -undefined dynamic_lookup
27+
LDDEPS :=
28+
RESFLAGS := -D "DEBUG=1" -D "_DEBUG=1" -D "OEPLUGIN" -D "JUCER_XCODE_MAC_F6D2F4CF=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I $(CURDIR)../../JuceLibraryCode -I $(CURDIR)../../JuceLibraryCode/modules
29+
CLEANCMD = rm -rf $(OUTDIR)/* $(OBJDIR)
30+
endif
31+
32+
ifeq ($(CONFIG),Release)
33+
BINDIR := $(CURDIR)/build
34+
LIBDIR := $(CURDIR)/build
35+
OBJDIR := $(CURDIR)/build/intermediate/plugins/Release
36+
OUTDIR := $(CURDIR)/build/Release/plugins
37+
38+
ifeq ($(TARGET_ARCH),)
39+
TARGET_ARCH := -march=native
40+
endif
41+
42+
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "OEPLUGIN" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)../../JuceLibraryCode -I $(CURDIR)../../JuceLibraryCode/modules
43+
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 -g -pg -std=c++0x -fPIC -rdynamic
44+
CXXFLAGS += $(CFLAGS)
45+
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt -pg -ldl -lXext -lGLU -fPIC -rdynamic
46+
LDDEPS1 :=
47+
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "OEPLUGIN" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)../../JuceLibraryCode -I $(CURDIR)../../JuceLibraryCode/modules
48+
CLEANCMD = rm -rf $(OUTDIR)/* $(OBJDIR)
49+
endif
50+
51+
export
52+
53+
SUBDIRS := $(wildcard $(PLUGIN_DIR)/*)
54+
55+
.PHONY: clean all notify $(SUBDIRS)
56+
57+
all: notify $(SUBDIRS)
58+
59+
notify:
60+
@echo "Building Open-Ephys Plugins"
61+
62+
$(SUBDIRS):
63+
@if [ -f $@/Makefile ]; then $(MAKE) -C $@ ; fi
64+
65+
%::
66+
@if [ -f $(PLUGIN_DIR)/$@/Makefile ]; then $(MAKE) -C $(PLUGIN_DIR)/$@ clean ; $(MAKE) -C $(PLUGIN_DIR)/$@ ; fi
67+
68+
69+
clean:
70+
@echo Cleaning open-ephys plugins
71+
@$(CLEANCMD)

Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj

Lines changed: 3807 additions & 2863 deletions
Large diffs are not rendered by default.

Builds/VisualStudio2013/open-ephys.sln

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
1+
Microsoft Visual Studio Solution File, Format Version 11.00
22
# Visual Studio 2013
3-
VisualStudioVersion = 12.0.31101.0
4-
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "open-ephys", "open-ephys.vcxproj", "{9C924D66-7DEC-1AEF-B375-DB8666BFB909}"
3+
Project("{5A05F353-1D63-394C-DFB0-981BB2309002}") = "open-ephys", "open-ephys.vcxproj", "{9C924D66-7DEC-1AEF-B375-DB8666BFB909}"
64
EndProject
75
Global
86
GlobalSection(SolutionConfigurationPlatforms) = preSolution
97
Debug|Win32 = Debug|Win32
10-
Debug|x64 = Debug|x64
11-
Debug64|Win32 = Debug64|Win32
12-
Debug64|x64 = Debug64|x64
138
Release|Win32 = Release|Win32
14-
Release|x64 = Release|x64
15-
Release64|Win32 = Release64|Win32
9+
Debug64|x64 = Debug64|x64
1610
Release64|x64 = Release64|x64
1711
EndGlobalSection
1812
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1913
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|Win32.ActiveCfg = Debug|Win32
2014
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|Win32.Build.0 = Debug|Win32
21-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug|x64.ActiveCfg = Debug|Win32
22-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|Win32.ActiveCfg = Debug64|x64
23-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.ActiveCfg = Debug64|x64
24-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.Build.0 = Debug64|x64
2515
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.ActiveCfg = Release|Win32
2616
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|Win32.Build.0 = Release|Win32
27-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release|x64.ActiveCfg = Release|Win32
28-
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|Win32.ActiveCfg = Release64|x64
17+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.ActiveCfg = Debug64|x64
18+
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Debug64|x64.Build.0 = Debug64|x64
2919
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|x64.ActiveCfg = Release64|x64
3020
{9C924D66-7DEC-1AEF-B375-DB8666BFB909}.Release64|x64.Build.0 = Release64|x64
3121
EndGlobalSection

JuceLibraryCode/modules/juce_core/system/juce_StandardHeader.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@
112112
#undef max
113113
#undef min
114114

115+
//Open Ephys addition: For some reason this define doesn't work as an Xcode option
116+
#if JUCE_MAC
117+
#define JUCE_API __attribute__((visibility("default")))
118+
#endif
115119
//==============================================================================
116120
// DLL building settings on Windows
117121
#if JUCE_MSVC

Source/Plugins/LfpDisplayNode/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OBJDIR := $(OBJDIR)/$(LIBNAME)
44
TARGET := $(LIBNAME).so
55

66

7-
SRC_DIR := ${shell find -type d -print}
7+
SRC_DIR := ${shell find ./ -type d -print}
88
VPATH := $(SOURCE_DIRS)
99

1010
SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp))

Source/Processors/PluginManager/OpenEphysPlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define PLUGIN_API __declspec(dllexport)
3636
#endif
3737
#else
38-
#define PLUGIN_API
38+
#define PLUGIN_API __attribute__((visibility("default")))
3939
#endif
4040

4141
struct ProcessorInfo;

open-ephys.jucer

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
<CONFIGURATIONS>
1818
<CONFIGURATION name="Debug" isDebug="1" optimisation="3" targetName="open-ephys"
1919
osxSDK="default" osxCompatibility="default" osxArchitecture="default"
20-
headerPath="/opt/local/include&#10;/usr/local/include" libraryPath="/opt/local/lib&#10;/usr/local/lib"/>
20+
headerPath="/opt/local/include&#10;/usr/local/include" libraryPath="/opt/local/lib&#10;/usr/local/lib"
21+
defines="JUCE_API=__attribute__((visibility(&quot;default&quot;)))"/>
2122
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="open-ephys"
2223
osxSDK="default" osxCompatibility="default" osxArchitecture="default"
23-
headerPath="/opt/local/include&#10;/usr/local/include" libraryPath="/opt/local/lib&#10;/usr/local/lib"/>
24+
headerPath="/opt/local/include&#10;/usr/local/include" libraryPath="/opt/local/lib&#10;/usr/local/lib"
25+
defines="JUCE_API=__attribute__((visibility(&quot;default&quot;)))"/>
2426
</CONFIGURATIONS>
2527
<MODULEPATHS>
2628
<MODULEPATH id="juce_video" path="JuceLibraryCode/modules"/>

0 commit comments

Comments
 (0)