pd-main/externals:
Compiled external for windows aka CYGWIN_NT-5.1
I couldn't build vorbis library, all other libs are okay.
Attached are the externals/Makefile and externals/OSCx/configure.in diff
files
--- Makefile.old 2007-12-14 19:39:49.953125000 +0100
+++ Makefile 2007-12-15 04:36:08.171875000 +0100
@@ -46,7 +46,8 @@
CFLAGS = -DPD $(OPT_CFLAGS) -I$(pd_src)/src -Wall -W $(DEBUG_CFLAGS)
LDFLAGS =
LIBS = -lm
-
+CYGWIN_CFLAG =
+CYGWIN_LD_FLAG =
ifeq ($(OS_NAME),darwin)
CFLAGS += -I/sw/include -DMACOSX -DUNIX -Dunix
LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -L/sw/lib \
@@ -57,12 +58,17 @@
endif
ifeq ($(OS_NAME),linux)
CFLAGS += -DUNIX -Dunix -fPIC
- LDFLAGS += -Wl,-export_dynamic -shared
+ LDFLAGS += -Wl,-export_dynamic -shared $(CYGWIN_CFLAG)
LIBS += -lc
DYLIB_LDFLAGS = $(LDFLAGS)
STRIP = strip --strip-unneeded -R .note -R .comment
endif
ifeq ($(OS_NAME),windows)
+ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
+ CYGWIN_CFLAG = -mno-cygwin -I/cygdrive/c/MinGW/include
+ CYGWIN_LIB = -L/cygdrive/c/MinGW/lib -mno-cygwin
+ LDFLAGS += -mno-cygwin
+endif
BUILDSRC_OS_NAME = win
WINDOWS_HACKS = -D'O_NONBLOCK=1' -D'srand48(n)=srand((n))' \
-D'drand48()=((double)rand()/RAND_MAX)' -D'bzero(p,n)=memset(p,0,n)'
@@ -70,12 +76,12 @@
# -D'PROT_READ=1' \
# -D'MAP_PRIVATE=2' \
# -D'O_NDELAY=O_NONBLOCK'
- CFLAGS += -mms-bitfields -DMSW -DNT $(WINDOWS_HACKS)
+ CFLAGS += -mms-bitfields -DMSW -DNT $(WINDOWS_HACKS) $(CYGWIN_CFLAG)
LDFLAGS += -shared
# all of these included libs are part of libc in UNIX platforms. All except
# libregex are in DLLs, so they get stripped from the external's .dll binary
- LIBS += -L$(pd_src)/bin -L$(pd_src)/obj -lpd \
- -lwsock32 -lpthreadGC2 -lkernel32 -luser32 -lgdi32 -lregex
+ LIBS += -L$(pd_src)/bin $(CYGWIN_LIB) -L$(pd_src)/obj -lpd \
+ -lwsock32 -lpthreadGC2 -lkernel32 -luser32 -lgdi32 -lregex $(CYGWIN_CFLAG)
DYLIB_LDFLAGS = -shared
STRIP = strip --strip-unneeded -R .note -R .comment
endif
@@ -85,7 +91,7 @@
### C++ files
%.$(EXTENSION): %.cpp
%.$(EXTENSION): %.cc
- $(CXX) $(CXXFLAGS) -o "$*.o" -c "$<"
+ $(CXX) $(CXXFLAGS) -o "$*.o" $(CYGWIN_CFLAG) -c "$<"
$(CXX) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
chmod a-x "$*.$(EXTENSION)"
# $(STRIP) $*.$(EXTENSION)
@@ -93,7 +99,7 @@
%.o: %.cpp
%.o: %.cc
- $(CXX) $(CXXFLAGS) -o "$*.o" -c "$<"
+ $(CXX) $(CXXFLAGS) -o "$*.o" $(CYGWIN_CFLAG) -c "$<"
### C files
@@ -124,17 +130,17 @@
#
# WARNING! this MUST be all on one line because the automatic package
# building scripts rely on it being that way.
-LIB_TARGETS = adaptive bassemu boids bsaylor creb cxc cyclone deprecated
earplug ekext ext13 flashserver flatspace flib freeverb ggee hardware hcs
iem_ambi iem_bin_ambi iemlib iemgui iem_adaptfilt iemmatrix iem_matrix
iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders mapping
markex maxlib mjlib moocow moonlib motex mrpeach msd oscx pan pdcontainer pddp
pdogg pmpd sigpack smlib tkwidgets tof toxy unauthorized vbap zexy
+LIB_TARGETS = adaptive bassemu boids bsaylor creb cxc cyclone deprecated
earplug ekext ext13 flashserver flatspace flib freeverb ggee hardware hcs
iem_ambi iem_bin_ambi iemlib iemgui iem_adaptfilt iemmatrix iem_matrix
iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders mapping
markex maxlib mjlib moocow moonlib motex mrpeach msd oscx pan pdcontainer pddp
pmpd sigpack smlib tkwidgets tof toxy unauthorized vbap windowing zexy
# this is for libraries that don't compile (yet) on all platforms
ifeq ($(OS_NAME),windows)
LIB_TARGETS +=
else
ifeq ($(OS_NAME),darwin)
- LIB_TARGETS += hid hidio pdp pidip gem2pdp wiiremote iem16
+ LIB_TARGETS += hid hidio pdp pidip gem2pdp wiiremote iem16 usbhid
else
# GNU/Linux, BSD, IRIX, etc.
- LIB_TARGETS += hid hidio pdp pidip gem2pdp hdspm_mixer iem16
+ LIB_TARGETS += hid hidio pdp pidip gem2pdp hdspm_mixer iem16 postlude
endif
endif
@@ -2071,6 +2077,7 @@
POSTLUDE_NAME=postlude
# flib is separate, so exclude it here
POSTLUDE_OBJECTS := $(wildcard $(externals_src)/postlude/[a-eg-z]*/src/*.c)
+# $(externals_src)/postlude/psql/psql.c
postlude: $(POSTLUDE_OBJECTS:.c=.$(EXTENSION))
postlude_install: postlude
@@ -2079,8 +2086,10 @@
--author "Jamie Bullock" \
--license "GNU GPL"
install -p $(POSTLUDE_OBJECTS:.c=.$(EXTENSION))
$(objectsdir)/$(POSTLUDE_NAME)
+ install -p $(externals_src)/postlude/dssi/doc/output~.pd \
+ $(objectsdir)/$(POSTLUDE_NAME)
install -d $(helpdir)/$(POSTLUDE_NAME)
- install -p $(externals_src)/postlude/*/doc/help-*.pd \
+ install -p $(externals_src)/postlude/*/doc/*-help.pd \
$(helpdir)/$(POSTLUDE_NAME)
# install -d $(manualsdir)/$(POSTLUDE_NAME)
# install -p $(externals_src)/postlude/manual.txt \
@@ -2088,8 +2097,8 @@
install -d $(readmesdir)
install -p $(externals_src)/postlude/dssi/README \
$(readmesdir)/$(POSTLUDE_NAME)-dssi.txt
- install -p $(externals_src)/postlude/getpatchname/README \
- $(readmesdir)/$(POSTLUDE_NAME)-getpatchname.txt
+ install -p $(externals_src)/postlude/psql/README \
+ $(readmesdir)/$(POSTLUDE_NAME)-psql.txt
install -d $(examplesdir)/$(POSTLUDE_NAME)
# install -p $(externals_src)/postlude/examples/*.pd \
# $(examplesdir)/$(POSTLUDE_NAME)
@@ -2439,6 +2448,44 @@
#------------------------------------------------------------------------------#
+# WINDOWING
+WINDOWING_NAME=windowing
+WINDOWING_OBJECTS := $(wildcard $(externals_src)/windowing/*.c)
+WINDOWING_SHARED := $(wildcard $(externals_src)/windowing/shared/*.c)
+windowing_shared: $(WINDOWING_SHARED:.c=.o)
+# $(CC) $(DYLIB_LDFLAGS) \
+# -o $(externals_src)/windowing/libwindowing.$(DYLIB_EXTENSION) \
+# $(WINDOWING_SHARED:.c=.o)
+
+windowing: windowing_shared $(WINDOWING_OBJECTS:.c=.$(EXTENSION))
+
+windowing_install: windowing
+ install -d $(objectsdir)/$(WINDOWING_NAME)
+ $(scripts_src)/generate-libdir-metafile.sh $(objectsdir)
$(WINDOWING_NAME) \
+ --author "Joe Sarlo" \
+ --license "GPLv2 or later"
+ install -p $(WINDOWING_OBJECTS:.c=.$(EXTENSION))
$(objectsdir)/$(WINDOWING_NAME)
+ install -d $(helpdir)/$(WINDOWING_NAME)
+ install -p $(externals_src)/windowing/*-help.pd \
+ $(helpdir)/$(WINDOWING_NAME)
+# install -d $(manualsdir)/$(WINDOWING_NAME)
+# install -p $(externals_src)/windowing/manual.txt \
+# $(manualsdir)/$(WINDOWING_NAME)
+ install -d $(readmesdir)
+ install -p $(externals_src)/windowing/README \
+ $(readmesdir)/$(WINDOWING_NAME).txt
+ install -d $(examplesdir)/$(WINDOWING_NAME)
+ install -p $(externals_src)/windowing/examples/*.pd \
+ $(examplesdir)/$(WINDOWING_NAME)
+
+windowing_clean:
+ -rm -f -- $(WINDOWING_OBJECTS:.c=.$(EXTENSION))
+ -rm -f -- $(WINDOWING_OBJECTS:.c=.o)
+ -rm -f -- $(externals_src)/windowing/*.bak
+ -rm -f -- $(externals_src)/windowing/*.*~
+
+
+#------------------------------------------------------------------------------#
# Zexy
ZEXY_NAME = zexy
ZEXY_OBJECTS := $(wildcard $(externals_src)/zexy/src/[a-vxy0]*.c) \
@@ -2513,13 +2560,13 @@
pdcontainer: $(PDCONTAINER_TARGETS)
$(PDCONTAINER_TARGETS) : %.$(EXTENSION) : $(PDCONTAINER_OBJ)
- $(CXX) $(LDFLAGS) -o $*.$(EXTENSION) "$*.o" $(shell ls `echo "$*.o" |
sed -e s/"h_[a-z]"/"\?\?"/g -e s/"map"/"Map"/g -e s/"set"/"Set"/g -e
s/"queue"/"Queue"/g`) $(PDC_SHARED:.cpp=.o) $(LIBS)
+ $(CXX) $(LDFLAGS) -o $*.$(EXTENSION) "$*.o" $(shell ls `echo "$*.o" |
sed -e s/"h_[a-z]"/"\?\?"/g -e s/"map"/"Map"/g -e s/"set"/"Set"/g -e
s/"queue"/"Queue"/g`) $(PDC_SHARED:.cpp=.o) $(LIBS) $(CYGWIN_CFLAG)
$(STRIP) $*.$(EXTENSION)
chmod 755 $*.$(EXTENSION)
#rm -f -- "$*.o"
$(PDCONTAINER_OBJ) : %.o : %.cpp
- $(CXX) $(CXXFLAGS) -DPDCONTAINER_SINGLE_OBJECT $(PDCONTAINER_INCLUDE)
-o "$*.o" -c "$*.cpp"
+ $(CXX) $(CXXFLAGS) -DPDCONTAINER_SINGLE_OBJECT $(PDCONTAINER_INCLUDE)
-o "$*.o" -c "$*.cpp" $(CYGWIN_CFLAG)
pdcontainer_install: pdcontainer
install -d $(objectsdir)/$(PDCONTAINER_NAME)
@@ -2879,13 +2926,13 @@
iemxmlrpc: $(IEMXMLRPC_TARGET)
$(IEMXMLRPC_TARGET) : $(IEMXMLRPC_SRC:.cpp=.o) $(XMLRPCPP_SRC:.cpp=.o)
- $(CXX) $(LDFLAGS) -o $(IEMXMLRPC_TARGET) $(IEMXMLRPC_SRC:.cpp=.o)
$(XMLRPCPP_SRC:.cpp=.o) $(LIBS)
+ $(CXX) $(LDFLAGS) -o $(IEMXMLRPC_TARGET) $(IEMXMLRPC_SRC:.cpp=.o)
$(XMLRPCPP_SRC:.cpp=.o) $(CYGWIN_CFLAG) $(LIBS)
$(STRIP) $(IEMXMLRPC_TARGET)
chmod 755 $(IEMXMLRPC_TARGET)
#rm -f -- "$*.o"
$(IEMXMLRPC_SRC:.cpp=.o) $(XMLRPCPP_SRC:.cpp=.o) : %.o : %.cpp
- $(CXX) $(CXXFLAGS) $(IEMXMLRPC_FLAGS) -o "$*.o" -c "$*.cpp"
+ $(CXX) $(CXXFLAGS) $(IEMXMLRPC_FLAGS) -o "$*.o" $(CYGWIN_CFLAG) -c
"$*.cpp"
iemxmlrpc_install: iemxmlrpc
install -d $(objectsdir)/$(IEMXMLRPC_NAME)
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(OSCxpd, 0.2, [EMAIL PROTECTED])
AC_CONFIG_SRCDIR([libOSC/OSC-client.h])
AC_CONFIG_HEADER([config.h])
# get system type
AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CC
AC_PROG_LN_S
# AC_PROG_CXX
AC_PROG_CPP
# AC_PROG_INSTALL
dnl ----------------------------------
dnl here you can see that autoconf adds "-g -02" as a default
dnl these are flags for debugging, and will add extra weight
dnl to you external. CFLAGS, CPPFLAGS, etc are default variables
dnl ----------------------------------
echo "default flags"
# echo "$CPPFLAGS"
# echo "$CXXFLAGS"
echo cflags "$CFLAGS"
echo ldflags "$LDFLAGS"
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lc':
AC_CHECK_LIB([c], [main])
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [main])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h
strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h
sys/prctl.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_HEADER_TIME
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([bzero gethostbyname inet_ntoa select socket strchr])
AC_TYPE_SIGNAL
# from augusts template
dnl ------------------------------------------
dnl for each of the *-*-host's in the following, do the checking and then set
your CFLAGS, CPPFLAGS and LDFLAGS
dnl CFLAGS get set for C code, CPPFLAGS for c++ code. LDFLAGS is the linking
flags for both c and c++
dnl ------------------------------------------
INCLUDES="-I../libOSC -I../../pd/src -I../../../pd/src -I../src"
LIBOSC=libOSC.a
if test -z "$GCC"; then
case $host in
*-*-irix*)
dnl If we're on IRIX, we wanna use cc even if gcc
dnl is there (unless the user has overriden us)...
if test -z "$CC"; then
CC=cc
fi
;;
sparc-sun-solaris*)
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
;;
*)
CFLAGS="-O"
;;
esac
else
case $host in
*86-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O2"
LDFLAGS="-Wl,-export_dynamic -shared"
dnl we could test for bad glibc here,
but don't
pd_suffix=pd_linux
LIBS="-lc -lm"
;;
powerpc-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
LIBS="-lc -lm"
;;
*-*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
INCLUDES="$INCLUDES"
pd_suffix=pd_linux
LIBS="-L../../../pd/bin -lpd -lc -lm"
;;
sparc-sun-*)
echo "YOU HAVE A SPARC STATION, not setting any
flags, not supported yet"
;;
*-*-cygwin*)
CFLAGS="$CFLAGS -mno-cygwin -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O3 "
LDFLAGS="-Wl,-export_dynamic -shared"
INCLUDES="$INCLUDES -I../../../pd/src"
pd_suffix=dll
LIBS="-lc -lm"
;;
*-*-mingw*)
CFLAGS="$CFLAGS -mms-bitfields -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O3 "
LDFLAGS="-shared"
INCLUDES="$INCLUDES -I../../../pd/src"
pd_suffix=dll
LIBS="-L../../../pd/bin
-L../../../pd/obj -lpd -lm -lwsock32"
;;
*-*-darwin*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O3 "
LDFLAGS=" -bundle -bundle_loader
../../../pd/bin/pd -flat_namespace "
pd_suffix=pd_darwin
LIBS="-lc -lm"
;;
*)
dnl assume unix
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused
-Wmissing-prototypes -O1"
LDFLAGS="-Wl,-export_dynamic -shared"
pd_suffix=pd_linux
LIBS="-lc -lm"
;;
esac
fi
CFLAGS="$CFLAGS $INCLUDES"
echo "Using cflags= $CFLAGS"
echo "Using ldflags= $LDFLAGS"
echo "Using includes= $INCLUDES"
dnl ------------------------------------------
dnl ---- add PureData includes dir
dnl ---- usually /usr/local/include
dnl ------------------------------------------
AC_ARG_WITH(pd_dir,
[ --with-pd-dir=path pd header path (default=/usr/local/include) ],
[
CPPFLAGS="$CPPFLAGS -I$withval"
echo
echo "pd dir is $withval"
echo
])
if test $prefix == NONE;
then
prefix=/usr/local
fi
dnl ------------------------------------------
dnl ---- check for PureData Header
dnl ------------------------------------------
AC_CHECK_HEADER(m_pd.h, [have_pd_hdr=yes ], [
have_pd_hdr=no
echo
echo "no m_pd.h header found. try with option
--with-pd-dir=/path/to/pd/src"
echo
exit
])
AC_SUBST(LIBOSC)
AC_SUBST(pd_suffix)
AC_SUBST(INCLUDES)
AC_SUBST(CFLAGS)
AC_CONFIG_FILES([src/Makefile
libOSC/Makefile
send+dump/Makefile
Makefile])
AC_OUTPUT
_______________________________________________
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev