Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3326
Modified Files: configure.ac Make.config.in Makefile Log Message: added build (and configure) target for compilation as single externals (as opposed to 1 big library)
Index: configure.ac =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/configure.ac,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** configure.ac 24 Jan 2006 21:34:48 -0000 1.17 --- configure.ac 6 Jun 2006 11:52:20 -0000 1.18 *************** *** 17,21 **** AC_SUBST(STRIP) AC_SUBST(STRIPFLAGS) ! AC_SUBST(ZEXY_VERSION) AC_SUBST(REFERENCEPATH) AC_SUBST(PDLIBDIR) --- 17,22 ---- AC_SUBST(STRIP) AC_SUBST(STRIPFLAGS) ! AC_SUBST(LIBRARY_VERSION) ! AC_SUBST(BUILDLIBRARY) AC_SUBST(REFERENCEPATH) AC_SUBST(PDLIBDIR) *************** *** 36,39 **** --- 37,42 ---- fi
+ AC_ARG_ENABLE(library,[ --disable-library split the library into single externals]) + if test "x" = "x${enable_PIC}" ; then enable_PIC="${with_PIC}" *************** *** 52,55 **** --- 55,64 ---- fi
+ if test "xno" != "x${enable_library}" ; then + dnl LATER: find a more generic way to generate the .._LIBRARY define + BUILDLIBRARY="-DZEXY_LIBRARY" + fi + + dnl Checks for libraries. dnl Replace `main' with a function in -lc: *************** *** 185,191 ****
- DFLAGS="-DZEXY_LIBRARY" - - dnl Checks for pd-version, to set the correct help-path AC_MSG_CHECKING("pd>=0.37") --- 194,197 ---- *************** *** 238,242 **** then echo -n "($with_version)...forced " ! ZEXY_VERSION="$with_version" else if test "x$cross_compiling" = "xno" --- 244,248 ---- then echo -n "($with_version)...forced " ! LIBRARY_VERSION="$with_version" else if test "x$cross_compiling" = "xno" *************** *** 253,264 **** if $CC $INCLUDES $DFLAGS -o conftest.o conftest.c > /dev/null 2>&1 then ! ZEXY_VERSION=`./conftest.o` ! echo "$ZEXY_VERSION" else ! ZEXY_VERSION="X" echo "(unknown)" fi else ! ZEXY_VERSION="X" echo "(X)" fi --- 259,270 ---- if $CC $INCLUDES $DFLAGS -o conftest.o conftest.c > /dev/null 2>&1 then ! LIBRARY_VERSION=`./conftest.o` ! echo "$LIBRARY_VERSION" else ! LIBRARY_VERSION="X" echo "(unknown)" fi else ! LIBRARY_VERSION="X" echo "(X)" fi
Index: Makefile =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile 6 Mar 2006 11:44:59 -0000 1.9 --- Makefile 6 Jun 2006 11:52:20 -0000 1.10 *************** *** 45,59 **** TARGETS = $(SOURCES:.c=.o)
all: $(LIBNAME) cp $(LIBNAME).$(EXT) ..
$(LIBNAME): $(TARGETS) z_zexy.c z_zexy.h ! $(LD) $(LFLAGS) -o $(LIBNAME).$(EXT) *.o $(LIBS) ! $(STRIP) $(STRIPFLAGS) $(LIBNAME).$(EXT)
$(TARGETS): %.o : %.c $(CC) $(Z_CFLAGS) -c -o $@ $*.c
clean: --- 45,72 ---- TARGETS = $(SOURCES:.c=.o)
+ OBJECTS = $(SOURCES:.c=)
+ ## if $(BUILDLIBRARY) is defined, we build everything as a single library + ## else we build separate externals + ifneq "$(BUILDLIBRARY)" "" all: $(LIBNAME) cp $(LIBNAME).$(EXT) .. + else + all: externals + endif + + + $(OBJECTS): $(TARGETS) + $(LD) $(LFLAGS) -o $@.$(EXT) $@.o $(LIBS) + $(STRIP) $(STRIPFLAGS) $@.$(EXT)
$(LIBNAME): $(TARGETS) z_zexy.c z_zexy.h ! $(LD) $(LFLAGS) -o $@.$(EXT) *.o $(LIBS) ! $(STRIP) $(STRIPFLAGS) $@.$(EXT)
$(TARGETS): %.o : %.c $(CC) $(Z_CFLAGS) -c -o $@ $*.c
+ externals: $(OBJECTS)
clean:
Index: Make.config.in =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/Make.config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Make.config.in 15 Dec 2005 16:06:56 -0000 1.2 --- Make.config.in 6 Jun 2006 11:52:20 -0000 1.3 *************** *** 1,4 **** --- 1,9 ---- LIBNAME =@LIBNAME@
+ # when build as a library this holds a pre-processor define + # (e.g. "-DZEXY_LIBRARY") + # when build as single externals this is empty + BUILDLIBRARY =@BUILDLIBRARY@ + PREFIX =@prefix@@PDLIBDIR@
*************** *** 19,26 **** WFLAGS =
! TARNAME = $(LIBNAME)-@ZEXY_VERSION@.tgz
# ICCFLAGS=-march=pentiumiii -axK ! Z_CFLAGS = $(IFLAGS) $(DEFS) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS)
MAKEDEP_FLAGS = @MAKEDEP_FLAGS@ --- 24,31 ---- WFLAGS =
! TARNAME = $(LIBNAME)-@LIBRARY_VERSION@.tgz
# ICCFLAGS=-march=pentiumiii -axK ! Z_CFLAGS = $(IFLAGS) $(DEFS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS)
MAKEDEP_FLAGS = @MAKEDEP_FLAGS@