aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoraugust black <augmentus@users.sourceforge.net>2010-07-28 09:14:17 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:05:31 +0200
commit6dec07e785db93ea9d2702b660b885d678dc87e4 (patch)
tree266817a13947e0b712e6d36dbf03339acd7e7b7c /Makefile
parent0f5d5d1a8a13c2bf08030e9569337ce2bc5cb789 (diff)
adding the readanysf~ again
svn path=/trunk/externals/august/readanysf~/; revision=13732
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile79
1 files changed, 66 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index d306b87..416b6f9 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,19 @@
GAVLPATH=/usr/local/include
PDPATH=/usr/local/include
+
+VERSION=0.40
+UNAME := $(shell uname)
+
+ifeq ($(UNAME), Linux)
+TARGET=pd_linux
+else
+# assume darwin here
+GAVLPATH=/sw/include
+PDPATH=/Applications/Pd-extended.app/Contents/Resources/include/
+TARGET=pd_darwin
+endif
+
##############################################
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
@@ -14,27 +27,67 @@ else
CFLAGS = -I./ -I$(GAVLPATH) -I$(GAVLPATH)/gavl -I$(GAVLPATH)/gmerlin -I$(PDPATH) -Wall
endif
+
+ifeq ($(UNAME), Linux)
+STRIP=strip --strip-unneeded
+# optimizations?
+#CFLAGS += -O1 -funroll-loops -fomit-frame-pointer \
+# -Wall -W -Wshadow \
+# -Wno-unused -Wno-parentheses -Wno-switch
LDFLAGS = -L/usr/local/lib -lpthread -lgavl -lgmerlin_avdec
+else
+# assume darwin here
+STRIP=strip -x
+CFLAGS += -I/sw/include -I$(externals_src)/pdp/include -DMACOSX -DUNIX -Dunix
+#LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -undefined dynamic_lookup \
+# -L/sw/lib -weak_framework Carbon -lc -L/sw/lib -lgavl -lgmerlin_avdec
+LDFLAGS = -dynamiclib -undefined dynamic_lookup -read_only_relocs warning -L/sw/lib -lgavl -lgmerlin_avdec
+# os 10.4
+#CFLAGS += -mmacosx-version-min=10.4 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
+#LDFLAGS = -L/sw/lib -lgavl -lgmerlin_avdec \
+# -dynamiclib -undefined dynamic_lookup -lsupc++ -mmacosx-version-min=10.4 \
+# -lSystem.B -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
+endif
+
-LINUXCFLAGS = -O1 -funroll-loops -fomit-frame-pointer \
- -Wall -W -Wshadow -Wstrict-prototypes \
- -Wno-unused -Wno-parentheses -Wno-switch
-all: pd_linux
+all: $(TARGET)
-pd_linux: readanysf~.cpp Readsf.cpp Readsf.h objs/FifoAudioFrames.o objs/Readsf.o FifoAudioFrames.h FifoAudioFrames.cpp
+pd_linux: src/readanysf~.cpp objs/FifoVideoFrames.o objs/FifoAudioFrames.o objs/ReadMedia.o
g++ -shared -o readanysf~.pd_linux $(CFLAGS) $(LDFLAGS) \
- readanysf~.cpp \
+ src/readanysf~.cpp \
objs/FifoAudioFrames.o \
- objs/Readsf.o
- strip --strip-unneeded readanysf~.pd_linux
+ objs/FifoVideoFrames.o \
+ objs/ReadMedia.o
+ $(STRIP) readanysf~.pd_linux
+
+pd_darwin: src/readanysf~.cpp objs/FifoVideoFrames.o objs/FifoAudioFrames.o objs/ReadMedia.o
+ g++ $(LDFLAGS) -o readanysf~.pd_darwin $(CFLAGS) \
+ src/readanysf~.cpp \
+ objs/FifoAudioFrames.o \
+ objs/FifoVideoFrames.o \
+ objs/ReadMedia.o
+ $(STRIP) readanysf~.pd_darwin
+ mkdir -p readanysf~$(VERSION)_MacOSX-Intel
+ mkdir -p readanysf~$(VERSION)_MacOSX-Intel/readanysf~
+ cp readanysf~.pd_darwin readanysf~-help.pd readanysf~$(VERSION)_MacOSX-Intel/readanysf~
+ cp READMEmacpkg.txt anysndfiler.pd readanysf~$(VERSION)_MacOSX-Intel/
+ mv readanysf~$(VERSION)_MacOSX-Intel/READMEmacpkg.txt readanysf~$(VERSION)_MacOSX-Intel/README.txt
+ ./embed-MacOSX-dependencies.sh readanysf~$(VERSION)_MacOSX-Intel/readanysf~
+ tar -cvf readanysf~$(VERSION)_MacOSX-Intel.tar readanysf~$(VERSION)_MacOSX-Intel/
+ gzip readanysf~$(VERSION)_MacOSX-Intel.tar
+
+objs/ReadMedia.o: src/ReadMedia.cpp src/ReadMedia.h objs/FifoAudioFrames.o objs/FifoVideoFrames.o
+ g++ -c -o objs/ReadMedia.o src/ReadMedia.cpp $(CFLAGS)
-objs/Readsf.o: Readsf.cpp Readsf.h FifoAudioFrames.h
- g++ -c -o objs/Readsf.o Readsf.cpp $(CFLAGS)
+objs/FifoAudioFrames.o: src/FifoAudioFrames.cpp src/FifoAudioFrames.h
+ g++ -c -o objs/FifoAudioFrames.o src/FifoAudioFrames.cpp $(CFLAGS)
-objs/FifoAudioFrames.o: FifoAudioFrames.cpp FifoAudioFrames.h
- g++ -c -o objs/FifoAudioFrames.o FifoAudioFrames.cpp $(CFLAGS)
+objs/FifoVideoFrames.o: src/FifoVideoFrames.cpp src/FifoVideoFrames.h
+ g++ -c -o objs/FifoVideoFrames.o src/FifoVideoFrames.cpp $(CFLAGS)
clean:
- rm objs/*.o readanysf~.pd_linux readanysf~.pd_darwin
+ if [ -d readanysf~$(VERSION)_MacOSX-Intel ]; then rm -rf readanysf~$(VERSION)_MacOSX-Intel; fi;
+ if [ -f readanysf~$(VERSION)_MacOSX-Intel.tar.gz ]; then rm -rf readanysf~$(VERSION)_MacOSX-Intel.tar.gz; fi;
+ rm -f objs/*.o readanysf~.pd_*