Update of /cvsroot/pure-data/externals/grill/dyn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19124
Modified Files: dyn_conn.cpp dyn_pd.h Added Files: build-pd-linux.sh config-pd-linux.txt makefile.pd-linux Log Message: makefiles for linux
Index: dyn_pd.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/dyn/dyn_pd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dyn_pd.h 27 Oct 2004 18:19:51 -0000 1.1 --- dyn_pd.h 26 Nov 2004 05:02:33 -0000 1.2 *************** *** 28,30 **** #endif
! #endif \ No newline at end of file --- 28,31 ---- #endif
! #endif !
Index: dyn_conn.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/dyn/dyn_conn.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dyn_conn.cpp 27 Oct 2004 18:19:51 -0000 1.1 --- dyn_conn.cpp 26 Nov 2004 05:02:33 -0000 1.2 *************** *** 38,40 **** } } ! */ \ No newline at end of file --- 38,41 ---- } } ! */ !
--- NEW FILE: config-pd-linux.txt ---
# your c++ compiler (define only if it's different than g++) # CXX=g++-3.3
# prefix to install the dyn library and header files # (leave blank to omit installation) INSTDIR=/usr/local
# where are the PD header files? (m_pd.h, m_imp.h, g_canvas.h) PDPATH=/usr/src/pd/src
# where should flext libraries be built? TARGDIR=./pd-linux
# where should the dyn library and header be installed? # (leave blank to omit installation) PREFIX=/usr/local
# additional compiler flags # (check if they fit for your system!) # UFLAGS=-march=pentium4
--- NEW FILE: build-pd-linux.sh --- #!/bin/sh
. config-pd-linux.txt
make -f makefile.pd-linux && { if [ $INSTDIR != "" ]; then echo Now install as root su -c "make -f makefile.pd-linux install" fi }
--- NEW FILE: makefile.pd-linux --- # Makefile for gcc @ linux # # usage: # to build run "make -f makefile.pd-linux" # to install (as root), do "make -f makefile.pd-linux install" #
CONFIG=config-pd-linux.txt
include ${CONFIG}
# compiler+linker stuff INCLUDES=${PDPATH} FLAGS=${UFLAGS}
# compiler flags for optimized build CFLAGS=-O2
# compiler flags for debug build CFLAGS_D=-g
# flags for shared linking LSHFLAGS= -shared
# ---------------------------------------------- # the rest can stay untouched # ----------------------------------------------
# all the source files from the package include make-files.txt
MAKEFILE=makefile.pd-linux
TARGET=$(TARGDIR)/lib$(NAME).so TARGET_D=$(TARGDIR)/lib$(NAME)_d.so HDRS=$(PHDRS) $(IHDRS)
all: $(TARGDIR) $(TARGET) $(TARGET_D)
$(TARGDIR): mkdir $(TARGDIR)
$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(patsubst %,$(SRCDIR)/%,$(IHDRS)) $(MAKEFILE) $(CONFIG) touch $@
$(TARGDIR)/%.o : $(SRCDIR)/%.cpp $(CXX) -c -shared $(CFLAGS) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.do : $(SRCDIR)/%.cpp $(CXX) -c -shared $(CFLAGS_D) $(CFLAGS_T) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(CXX) $(LSHFLAGS) -o $@ $^
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS)) $(CXX) $(LSHFLAGS) -o $@ $^
.PHONY: clean install
clean: rm -f $(TARGDIR)/*.{o,do} $(TARGET) $(TARGET_D) ifdef PREFIX
install:: $(PREFIX) endif
install:: $(TARGET) $(TARGET_D) # cp $(patsubst %,$(SRCDIR)/%,$(PHDRS)) $(PREFIX)/include cp $(TARGDIR)/lib*.dylib $(PREFIX)/lib