[PD-cvs] SF.net SVN: pure-data: [9960] trunk/externals/jackx

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Sun Jun 1 20:15:56 CEST 2008


Revision: 9960
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9960&view=rev
Author:   eighthave
Date:     2008-06-01 11:15:56 -0700 (Sun, 01 Jun 2008)

Log Message:
-----------
got rid of warnings and made build on Mac OS X

Modified Paths:
--------------
    trunk/externals/jackx/jackx.c
    trunk/externals/jackx/makefile

Modified: trunk/externals/jackx/jackx.c
===================================================================
--- trunk/externals/jackx/jackx.c	2008-06-01 18:10:47 UTC (rev 9959)
+++ trunk/externals/jackx/jackx.c	2008-06-01 18:15:56 UTC (rev 9960)
@@ -33,6 +33,9 @@
 #include "m_pd.h"
 
 #include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -72,7 +75,7 @@
 void jackports_input(t_jackports *x, t_symbol *s,int argc, t_atom *argv)
 {
 	if (jc){
-	char ** ports;
+	const char ** ports;
 
 	int l = 0;
 	int n = 0;
@@ -287,7 +290,7 @@
 {
 	if (jc) {
 
-		char **ports;
+		const char **ports;
 		int n=0;
 		jackconnect_getnames(x);
 		

Modified: trunk/externals/jackx/makefile
===================================================================
--- trunk/externals/jackx/makefile	2008-06-01 18:10:47 UTC (rev 9959)
+++ trunk/externals/jackx/makefile	2008-06-01 18:15:56 UTC (rev 9960)
@@ -1,7 +1,32 @@
-jackx: jackx.c
-	gcc $(CFLAGS) $(LINUXCFLAGS) $(LINUXINCLUDE) -o jackx.o -c jackx.c
-	ld -export_dynamic  -shared -o jackx.pd_linux jackx.o -lc -lm
-	strip --strip-unneeded jackx.pd_linux
-	rm jackx.o
 
+CFLAGS = -DPD $(OPT_CFLAGS) -I../../pd/src -Wall -W $(DEBUG_CFLAGS)
+LDFLAGS =  
+LIBS = -lm
 
+UNAME := $(shell uname -s)
+ifeq ($(UNAME),Linux)
+  OS_NAME = linux
+  EXTENSION = pd_linux
+  CFLAGS += -DUNIX -Dunix -fPIC
+  LDFLAGS += -Wl,-export_dynamic  -shared
+endif
+ifeq ($(UNAME),Darwin)
+  OS_NAME = darwin
+  EXTENSION = pd_darwin
+  CFLAGS += -DMACOSX -DUNIX -Dunix
+  LDFLAGS += -bundle -bundle_loader ../../pd/bin/pd -undefined dynamic_lookup
+endif
+
+all: jackx.$(EXTENSION)
+
+%.o: %.c
+	$(CC) $(CFLAGS) -o "$*.o" -c "$*.c"
+
+%.$(EXTENSION): %.o
+	$(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o"  $(LIBS)
+	chmod a-x "$*.$(EXTENSION)"
+	rm -f -- $*.o
+
+clean:
+	-rm -f -- jackx.$(EXTENSION)
+	-rm -f -- jackx.o


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list