aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-02-23 03:32:54 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-02-23 03:32:54 +0000
commitd5f3af34344340c718d07c9c84d562785443747e (patch)
tree87ca39a07f491898c292c2900a6bd3aee8134f77 /externals/grill/flext
parent95bf21f70657b8acada4120e51207d64c97445cd (diff)
""
svn path=/trunk/; revision=1350
Diffstat (limited to 'externals/grill/flext')
-rw-r--r--externals/grill/flext/config-pd-cygwin.txt6
-rw-r--r--externals/grill/flext/config-pd-mingw.txt4
-rw-r--r--externals/grill/flext/makefile.pd-cygwin44
-rw-r--r--externals/grill/flext/makefile.pd-linux8
-rw-r--r--externals/grill/flext/makefile.pd-mingw47
-rwxr-xr-xexternals/grill/flext/source/flprefix.h8
6 files changed, 63 insertions, 54 deletions
diff --git a/externals/grill/flext/config-pd-cygwin.txt b/externals/grill/flext/config-pd-cygwin.txt
index 50a72db0..e596da76 100644
--- a/externals/grill/flext/config-pd-cygwin.txt
+++ b/externals/grill/flext/config-pd-cygwin.txt
@@ -1,5 +1,5 @@
# flext - C++ layer for Max/MSP and pd (pure data) externals
-# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+# Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
#
# your c++ compiler (define only if it's different than g++)
@@ -10,11 +10,11 @@ PDPATH=/cygdrive/c/programme/audio/pd
# where is the SndObj include directory?
# (leave blank or comment out to disable SndObj support)
-SNDOBJ=/cygdrive/f/prog/audio/sndobj/include
+# SNDOBJ=/cygdrive/f/prog/audio/sndobj/include
# where is the STK include directory?
# (leave blank or comment out to disable STK support)
-STK=/cygdrive/f/prog/audio/stk/include
+# STK=/cygdrive/f/prog/audio/stk/include
# where should flext libraries be built?
TARGDIR=./pd-cygwin
diff --git a/externals/grill/flext/config-pd-mingw.txt b/externals/grill/flext/config-pd-mingw.txt
index a71d5c46..132d4ccb 100644
--- a/externals/grill/flext/config-pd-mingw.txt
+++ b/externals/grill/flext/config-pd-mingw.txt
@@ -10,11 +10,11 @@ PDPATH=c:/programme/audio/pd
# where is the SndObj include directory?
# (leave blank or comment out to disable SndObj support)
-#SNDOBJ=/cygdrive/f/prog/audio/sndobj/include
+#SNDOBJ=f:/prog/audio/sndobj/include
# where is the STK include directory?
# (leave blank or comment out to disable STK support)
-#STK=/cygdrive/f/prog/audio/stk/include
+#STK=f:/prog/audio/stk/include
# where should flext libraries be built?
TARGDIR=./pd-mingw
diff --git a/externals/grill/flext/makefile.pd-cygwin b/externals/grill/flext/makefile.pd-cygwin
index 85b5d321..951e7990 100644
--- a/externals/grill/flext/makefile.pd-cygwin
+++ b/externals/grill/flext/makefile.pd-cygwin
@@ -6,25 +6,26 @@
# usage:
# to build run "make -f makefile.pd-cygwin"
#
-# ---------------------------------------------
-#
-# compiling for threaded usage is not supported
-#
+# -----------------------------------------------------------
+
CONFIG=config-pd-cygwin.txt
+MAKEFILE=makefile.pd-cygwin
include $(CONFIG)
# compiler+linker stuff
-INCLUDES=$(PDPATH)/src # /usr/include
+# /usr/include before the PD path is necessary to include the right pthread files!
+INCLUDES=/usr/include $(PDPATH)/src
FLAGS=-DFLEXT_SYS=2 $(UFLAGS)
CFLAGS=-O2
CFLAGS_D=-DFLEXT_DEBUG -g
CFLAGS_T=-DFLEXT_THREADS
-CFLAGS_S=-DFLEXT_SHARED
-LIBS=
+CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
+
+PDLIBS=$(PDPATH)/bin/pd.dll $(PDPATH)/bin/pthreadVC.dll
INSTDIR=$(PDPATH)/flext
@@ -50,7 +51,7 @@ SRCS+=$(SRCS_STK)
HDRS+=$(HDRS_STK)
endif
-MAKEFILE=makefile.pd-cygwin
+
TARGET=$(TARGDIR)/$(NAME)-pdwin.lib
TARGET_D=$(TARGDIR)/$(NAME)_d-pdwin.lib
TARGET_T=$(TARGDIR)/$(NAME)_t-pdwin.lib
@@ -58,7 +59,7 @@ TARGET_TD=$(TARGDIR)/$(NAME)_td-pdwin.lib
TARGET_S=$(TARGDIR)/$(NAME).dll
TARGET_SD=$(TARGDIR)/$(NAME)_d.dll
-TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) # $(TARGET_S) $(TARGET_SD)
+TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
all: $(TARGDIR) $(TARGETS)
@@ -69,47 +70,48 @@ $(TARGDIR):
$(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE) $(CONFIG)
touch $@
-$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.ro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.do : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.to : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.tro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.so : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.sro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS))
+$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
- $(CXX) -o $@ $^
+$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
+ $(CXX) -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
+ strip --strip-unneeded $@
chmod 755 $@
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- $(CXX) -o $@ $^
+ $(CXX) -g -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
chmod 755 $@
diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux
index b355ccf3..de0f4e5d 100644
--- a/externals/grill/flext/makefile.pd-linux
+++ b/externals/grill/flext/makefile.pd-linux
@@ -106,19 +106,19 @@ $(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
diff --git a/externals/grill/flext/makefile.pd-mingw b/externals/grill/flext/makefile.pd-mingw
index 9a7db3a5..ac62dda1 100644
--- a/externals/grill/flext/makefile.pd-mingw
+++ b/externals/grill/flext/makefile.pd-mingw
@@ -7,24 +7,24 @@
# to build run "make -f makefile.pd-mingw"
#
# ---------------------------------------------
-#
-# compiling for threaded usage is not supported
-#
+
CONFIG=config-pd-mingw.txt
+MAKEFILE=makefile.pd-mingw
include $(CONFIG)
# compiler+linker stuff
-INCLUDES=$(PDPATH)/src # /usr/include
+INCLUDES=$(PDPATH)/src
FLAGS=-DFLEXT_SYS=2 $(UFLAGS)
CFLAGS=-O2
CFLAGS_D=-DFLEXT_DEBUG -g
CFLAGS_T=-DFLEXT_THREADS
-CFLAGS_S=-DFLEXT_SHARED
-LIBS=
+CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
+
+PDLIBS=$(PDPATH)/bin/pd.dll $(PDPATH)/bin/pthreadVC.dll
INSTDIR=$(PDPATH)/flext
@@ -50,64 +50,67 @@ SRCS+=$(SRCS_STK)
HDRS+=$(HDRS_STK)
endif
-MAKEFILE=makefile.pd-mingw
+
TARGET=$(TARGDIR)/$(NAME)-pdwin.lib
TARGET_D=$(TARGDIR)/$(NAME)_d-pdwin.lib
TARGET_T=$(TARGDIR)/$(NAME)_t-pdwin.lib
TARGET_TD=$(TARGDIR)/$(NAME)_td-pdwin.lib
+TARGET_S=$(TARGDIR)/$(NAME).dll
+TARGET_SD=$(TARGDIR)/$(NAME)_d.dll
-TARGETS=$(TARGET) $(TARGET_D) # $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
+TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
all: $(TARGDIR) $(TARGETS)
+
$(TARGDIR):
-mkdir $(TARGDIR)
$(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE) $(CONFIG)
- touch $@
-
+# echo touch $@ # minGW has no touch
-$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.ro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.do : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.to : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.tro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.so : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.sro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS))
+$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
- $(CXX) -o $@ $^
+$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
+ $(CXX) -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
+ strip --strip-unneeded $@
chmod 755 $@
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- $(CXX) -o $@ $^
+ $(CXX) -g -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
chmod 755 $@
diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h
index 71cdaee9..7b39af88 100755
--- a/externals/grill/flext/source/flprefix.h
+++ b/externals/grill/flext/source/flprefix.h
@@ -237,7 +237,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#if FLEXT_OS == FLEXT_OS_MAC
#define FLEXT_OSAPI FLEXT_OSAPI_MAC_MACH
#elif FLEXT_OS == FLEXT_OS_WIN
- #define FLEXT_OSAPI FLEXT_OSAPI_WIN_POSIX
+ #if defined(__MINGW32__)
+ #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE
+ #else
+ #define FLEXT_OSAPI FLEXT_OSAPI_WIN_POSIX
+ #endif
#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX
#define FLEXT_OSAPI FLEXT_OSAPI_UNIX_POSIX
#else
@@ -249,7 +253,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// Apple MPW MrCpp
#if __MRC__ < 0x500
- #error Apple MPW MrCpp v.5.0.0 or better compiler required
+ #error Apple MPW MrCpp v.5.0.0 or later compiler required
#endif
#ifndef FLEXT_CPU