[PD-cvs] externals/grill/flext build-max-darwin.sh,NONE,1.1 config-max-darwin.txt,NONE,1.1 makefile.max-darwin,NONE,1.1 changes.txt,1.51,1.52 readme.txt,1.46,1.47

Thomas Grill xovo at users.sourceforge.net
Tue Aug 24 04:34:32 CEST 2004


Update of /cvsroot/pure-data/externals/grill/flext
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11329

Modified Files:
	changes.txt readme.txt 
Added Files:
	build-max-darwin.sh config-max-darwin.txt makefile.max-darwin 
Log Message:
 ""

--- NEW FILE: build-max-darwin.sh ---
#!/bin/sh  

. config-max-darwin.txt

make -f makefile.max-darwin &&
{ 
	if [ $INSTDIR != "" ]; then
		echo Now install as root
		sudo make -f makefile.max-darwin install
	fi
}

Index: readme.txt
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/readme.txt,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** readme.txt	11 Aug 2004 04:04:25 -0000	1.46
--- readme.txt	24 Aug 2004 02:34:30 -0000	1.47
***************
*** 122,125 ****
--- 122,129 ----
  
  
+ o GCC: edit "config-max-darwin.txt" & run "sh build-max-darwin.sh" 
+ 	additional settings (e.g. target processor, compiler flags) can be made in makefile.max-darwin
+ 
+ 
  With your project using flext, be sure to define "FLEXT_SYS=1" 
  - alternatively use the prefix file "flcwmax-x.h" or "flcwmax-x-thr.h" for threading support.

--- NEW FILE: makefile.max-darwin ---
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001-2004 Thomas Grill (xovo at gmx.net)
#
# Makefile for gcc @ darwin
# 
# usage:
# to build run "make -f makefile.max-darwin"
# to install (as root), do "make -f makefile.max-darwin install"
#

CONFIG=config-max-darwin.txt

include ${CONFIG}

# compiler+linker stuff 
# the MaxMSP SDK path is directly inserted with the FLAGS below because it normally contains spaces...
INCLUDES=    
FLAGS=-I${MAXSDKPATH}/max-includes -I${MAXSDKPATH}/msp-includes -DFLEXT_SYS=1 ${UFLAGS}

# compiler flags for optimized build
CFLAGS=-O2 

# compiler flags for debug build
CFLAGS_D=-g

# additional flags for threading
CFLAGS_T=-DFLEXT_THREADS

# additional flags for shared library
CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS

# flags for shared linking
LSHFLAGS= -dylib -dynamic -flat_namespace -undefined suppress

# frameworks
FRAMEWORKS=MaxAPI MaxAudioAPI


# ----------------------------------------------
# the rest can stay untouched
# ----------------------------------------------

NAME=flext

SRCDIR=./source

# all the source files from the package
include make-files.txt

ifdef SNDOBJ
INCLUDES+=$(SNDOBJ)
SRCS+=$(SRCS_SNDOBJ)
HDRS+=$(HDRS_SNDOBJ)
endif

ifdef STK
INCLUDES+=$(STK)
SRCS+=$(SRCS_STK)
HDRS+=$(HDRS_STK)
endif


MAKEFILE=makefile.max-darwin

TARGET=$(TARGDIR)/lib$(NAME).a
TARGET_D=$(TARGDIR)/lib$(NAME)_d.a
TARGET_T=$(TARGDIR)/lib$(NAME)_t.a
TARGET_TD=$(TARGDIR)/lib$(NAME)_td.a
TARGET_S=$(TARGDIR)/lib$(NAME).dylib
TARGET_SD=$(TARGDIR)/lib$(NAME)_d.dylib


all: $(TARGDIR) $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) #  $(TARGET_S) $(TARGET_SD)

$(TARGDIR):
	mkdir $(TARGDIR)

$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(patsubst %,$(SRCDIR)/%,$(IHDRS)) $(MAKEFILE) $(CONFIG)
	touch $@

$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
	$(CXX) -c -dynamic $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@

$(TARGDIR)/%.do : $(SRCDIR)/%.cpp
	$(CXX) -c -dynamic $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@

$(TARGDIR)/%.to : $(SRCDIR)/%.cpp
	$(CXX) -c -dynamic $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@

$(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
	$(CXX) -c -dynamic $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@

$(TARGDIR)/%.so : $(SRCDIR)/%.cpp
	$(CXX) -c -dynamic $(CFLAGS) $(CFLAGS_T)  $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@

$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp 
	$(CXX) -c -dynamic $(CFLAGS_D) $(CFLAGS_T)  $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $(patsubst %,-F%,$(FRAMEWORKS)) $< -o $@

$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) 
	libtool -static -o $@ $^

$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS)) 
	libtool -static -o $@ $^

$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS))
	libtool -static -o $@ $^

$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
	libtool -static -o $@ $^

$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
	ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS)) 

$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
	ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS)) 

.PHONY: clean install

clean:
	rm -f $(TARGDIR)/*.{o,do,to,tdo,so,sdo} $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
	
ifdef INSTDIR
$(INSTDIR):
	-mkdir $(INSTDIR)

install:: $(INSTDIR)
endif

install:: $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD) $(patsubst %,$(SRCDIR)/%,$(HDRS)) 
	cp $^ $(INSTDIR)
	mv $(INSTDIR)/lib*.dylib /usr/local/lib
	ranlib $(INSTDIR)/*.a  # have to rerun ranlib at install dir ?!
	
	#make compatibility links for old-style naming
	for i in $(foreach f,$(notdir $(filter %.a,$^)),$(patsubst lib%.a,%,$(f))); do rm -f $(INSTDIR)/$$i.a && ln -sf lib$$i.a $(INSTDIR)/$$i.a; done 

#	chmod 755 $(patsubst %,$(INSTDIR)/%,$(notdir $^))
#	chgrp admin $(patsubst %,$(INSTDIR)/%,$(notdir $^))











--- NEW FILE: config-max-darwin.txt ---
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001-2004 Thomas Grill (xovo at gmx.net)
#

# your c++ compiler (define only if it's different than g++)
# CXX=g++-3.3

# where is the Max SDK? (version 4.5 upwards!!)
MAXSDKPATH="/Volumes/Daten/Prog/MaxMSP-SDK/4.5 headers/c74support"

# where is the SndObj include directory? 
# (leave blank or comment out to disable SndObj support)
# SNDOBJ=/usr/src/sndobj/include

# where is the STK include directory?
# (leave blank or comment out to disable STK support)
# STK=/usr/src/stk/include

# where should flext libraries be built?
TARGDIR=./max-darwin

# where should flext libraries be installed?
# (leave blank to omit installation)
INSTDIR="/Library/Application Support/Cycling '74/flext"

# additional compiler flags
# (check if they fit for your system!)
UFLAGS=-DFLEXT_USE_SIMD -malign-power -maltivec -faltivec

Index: changes.txt
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/changes.txt,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** changes.txt	23 Aug 2004 02:33:16 -0000	1.51
--- changes.txt	24 Aug 2004 02:34:30 -0000	1.52
***************
*** 21,25 ****
  - small fixes for MSVC6 incompatibilites
  - fixes for Max 4.5 headers
! - removed Mach-O/CFM glue stuff again....Max has gone Mach-O in the meantime...
  - in flext::StopThread don't wait for thread to have stopped!
  
--- 21,25 ----
  - small fixes for MSVC6 incompatibilites
  - fixes for Max 4.5 headers
! - removed Mach-O/CFM glue stuff again and added makefiles for Max/MachO
  - in flext::StopThread don't wait for thread to have stopped!
  
***************
*** 303,306 ****
--- 303,307 ----
  - SIMD for gcc
  - individual apply buttons for each attribute in the attribute editor
+ - Max/MSP MachO support
  
  bugs:





More information about the Pd-cvs mailing list