diff options
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/Makefile | 2 | ||||
-rw-r--r-- | opengl/Makefile.config | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/opengl/Makefile b/opengl/Makefile index b0b3027..719fa59 100644 --- a/opengl/Makefile +++ b/opengl/Makefile @@ -24,7 +24,7 @@ pdp_opengl.pd_linux: subdirs pdp_opengl.pd_darwin: subdirs rm -f pdp_opengl.pd_linux - $(CC) -o pdp_opengl.pd_pd_darwin ../modules/*/*.o ../system/pdp.o ../system/*/*.o ../puredata/*.o modules/*.o system/*.o $(PDP_LIBS) -bundle -undefined error -twolevel_namespace -bundle_loader $(PD_EXECUTABLE) + $(CC) -o pdp_opengl.pd_pd_darwin ../modules/*/*.o ../system/pdp.o ../system/*/*.o ../puredata/*.o modules/*.o system/*.o $(PDP_LIBS) -bundle -undefined dynamic_lookup -bundle_loader $(PD_EXECUTABLE) # $(CC) -o pdp_opengl.pd_pd_darwin modules/*.o system/*.o $(LDFLAGS) -g -dynamic -bundle -flat_namespace -undefined suppress diff --git a/opengl/Makefile.config b/opengl/Makefile.config index 203420c..7fab2d9 100644 --- a/opengl/Makefile.config +++ b/opengl/Makefile.config @@ -8,24 +8,27 @@ PDP_OGL_DIR = ../include CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wstrict-prototypes -Werror \ - -Wno-unused -Wno-parentheses -Wno-switch -g + -Wno-unused -Wno-parentheses -Wno-switch -g -I../../../../pd/src CPPFLAGS = -I$(PDP_DIR) -I$(PDP_OGL_DIR) -I/usr/X11R6/include -DPDP_VERSION=\"$(PDP_VERSION)\" # CPPFLAGS = -I$(PD_DIR) -I$(PDP_DIR) -I$(PDP_OGL_DIR) -I/usr/X11R6/include -LDFLAGS = -lGL -lglut +UNAME := $(shell uname -s) +ifeq ($(UNAME),Linux) + TARGET=linux + LDFLAGS = -lGL -lglut +endif +ifeq ($(UNAME),Darwin) + TARGET = darwin + CPPFLAGS += -I/sw/include + PD_EXECUTABLE=../../../pd/bin/pd + LDFLAGS = -lGL -lGLU -lglut -lX11 -L/sw/lib -L/usr/X11R6/lib +endif -TARGET=linux -PDP_OPENGL_LIBRARY_NAME=pdp_opengl.pd_$(TARGET) - -#uncomment these for darwin: -#TARGET=darwin -#CPPFLAGS+=-I/sw/include -#PD_EXECUTABLE=/usr/local/bin/pd -#LDFLAGS = -lGL -lGLU -lglut -lX11 -L/sw/lib -L/usr/X11R6/lib +PDP_OPENGL_LIBRARY_NAME=pdp_opengl.pd_$(TARGET) .c.o: |