aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-10-03 15:35:26 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-10-03 15:35:26 +0000
commit7855414d370528846082416bac88e8e8d4023465 (patch)
treed52918f21d77af1b95b4929df83177d52dea395e /makefile
[wiimote] by Mike Wozniewki (with fixes by Florian Krebs and IO)svn2git-root
svn path=/trunk/externals/hardware/wiimote/; revision=12512
Diffstat (limited to 'makefile')
-rw-r--r--makefile65
1 files changed, 65 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..1258850
--- /dev/null
+++ b/makefile
@@ -0,0 +1,65 @@
+NAME=wiimote
+SYM=wiimote
+
+# If you want to use a customized Pd, then define a $PD_PATH variable.
+# Otherwise, the Pd must be installed on the system
+PD_PATH=../../../pd
+
+# specify the path to CWiid:
+#CWIID_PATH = $(ASCAPE_PATH)/usr/lib
+LIBCWIID_PATH = "cwiid-svn/libcwiid"
+
+######################################################
+# You shouldn't need to change anything beyond here! #
+######################################################
+
+
+ifdef PD_PATH
+PD_INCLUDE := -I$(PD_PATH)/src
+PD_EXTRA_PATH := ../../../../lib/libs
+PD_DOC_PATH := ../../../../lib/pd-help
+else
+PD_INCLUDE := -I../../../pd/src
+PD_EXTRA_PATH := /usr/local/lib/pd/extra
+PD_DOC_PATH := /usr/local/lib/pd/doc
+endif
+
+
+LIBS = $(LIBCWIID_PATH)/libcwiid.a -lbluetooth -lpthread
+#LIBS = -lcwiid -lbluetooth -lpthread
+
+current: pd_linux
+
+##### LINUX:
+
+pd_linux: $(NAME).pd_linux
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+ -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+.c.pd_linux:
+ $(CC) $(LINUXCFLAGS) $(PD_INCLUDE) -o $*.o -c $*.c
+ $(LD) --export-dynamic -shared -o $*.pd_linux $*.o $(LIBS) -lc -lm
+ strip --strip-unneeded $*.pd_linux
+ rm -f $*.o
+
+install:
+
+ifdef ASCAPE_INSTALLED
+ -cp *help*.pd $(ASCAPE_PATH)/ss_engine/pd/help/.
+ifeq ($(findstring Linux,$(ASCAPE_OS)),Linux)
+ -cp *.pd_linux $(ASCAPE_PATH)/ss_engine/pd/externs/$(ASCAPE_OS)$(ASCAPE_ARCH)/.
+endif
+ifeq ($(findstring Darwin,$(SS_OS)),Darwin)
+ -cp *.pd_darwin $(ASCAPE_PATH)/ss_engine/pd/externs/$(ASCAPE_OS)$(ASCAPE_ARCH)/.
+endif
+endif
+
+ -cp *.pd_linux $(PD_EXTRA_PATH)/.
+ -cp *help*.pd $(PD_DOC_PATH)/.
+
+clean:
+ -rm -f *.o *.pd_* so_locations