From 3f58fe886891956784f544444dbe16a937f0b7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 9 Apr 2009 12:01:00 +0000 Subject: use for fat binaries (on demand) svn path=/trunk/externals/iem/iemmatrix/; revision=10996 --- src/Make.config.in | 5 ++--- src/Makefile | 6 +++--- src/configure.ac | 18 +++++++----------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/Make.config.in b/src/Make.config.in index 7c685e0..e38e9d5 100644 --- a/src/Make.config.in +++ b/src/Make.config.in @@ -1,4 +1,5 @@ LIBRARY_NAME=@LIBRARY_NAME@ +TARNAME = $(LIBRARY_NAME)-@LIBRARY_VERSION@.tgz # when build as a library this holds a pre-processor define # (e.g. "-DZEXY_LIBRARY") @@ -19,13 +20,11 @@ LD = @LD@ STRIP = @STRIP@ STRIPFLAGS= @STRIPFLAGS@ -AFLAGS = LFLAGS = @LFLAGS@ WFLAGS = +AFLAGS = @ARCH_FLAGS@ -TARNAME = $(LIBRARY_NAME)-@LIBRARY_VERSION@.tgz -# ICCFLAGS=-march=pentiumiii -axK LIBRARY_CFLAGS = $(IFLAGS) $(DEFS) $(BUILDLIBRARY) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS) MAKEDEP_FLAGS = @MAKEDEP_FLAGS@ diff --git a/src/Makefile b/src/Makefile index 9f1e816..6003f32 100644 --- a/src/Makefile +++ b/src/Makefile @@ -73,15 +73,15 @@ all: $(OBJECTS) endif $(OBJECTS): %.$(EXT) : %.o - $(LD) $(LFLAGS) -o $@ $*.o $(LIBS) + $(LD) $(LFLAGS) $(AFLAGS) -o $@ $*.o $(LIBS) $(STRIP) $(STRIPFLAGS) $@ $(LIBRARY_NAME): $(TARGETS) $(LIBRARY_NAME)_sources.c $(LIBRARY_NAME)_sources.h - $(LD) $(LFLAGS) -o $@.$(EXT) *.o $(LIBS) + $(LD) $(LFLAGS) $(AFLAGS) -o $@.$(EXT) *.o $(LIBS) $(STRIP) $(STRIPFLAGS) $@.$(EXT) $(TARGETS): %.o : %.c - $(CC) $(LIBRARY_CFLAGS) -c -o $@ $< + $(CC) $(LIBRARY_CFLAGS) $(AFLAGS) -c -o $@ $< externals: $(OBJECTS) diff --git a/src/configure.ac b/src/configure.ac index 4849757..6986703 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -123,6 +123,12 @@ else fi + +### can we build fat-binaries +AC_CHECK_FAT(ARCH_FLAGS) +AC_SUBST(ARCH_FLAGS) + + dnl isn't there a better way to check for good linker/stripper ? dnl if we don't have $LD set, we set it to $(CC) @@ -165,22 +171,12 @@ dnl dnl OK, checks which machines are here now dnl this needs some rethinking when cross-compiling (?) dnl -AC_CHECK_LDFLAGS([-export_dynamic -shared]) +AC_CHECK_LDFLAGS([-shared]) if test `uname -s` = Linux; then EXT=pd_linux STRIPFLAGS="--strip-unneeded" - if test "$enable_icc" = "yes"; then - CC=icc - fi - - if test $CC = "icc" - then - LD=$CC - AC_CHECK_LDFLAGS([-ip -ipo_obj]) - AC_CHECK_CFLAGS([-ip -ipo_obj]) - fi fi dnl This should use '-bundle_loader /path/to/pd/bin/pd' instead of'-undefined suppress' -- cgit v1.2.1