aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-04-09 12:01:00 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-04-09 12:01:00 +0000
commit3f58fe886891956784f544444dbe16a937f0b7c6 (patch)
tree8b212b35a191c9cec5117797a18bbcb367a4923c
parent72fd006b924d5cb59905477d5f28dfe2a9c50747 (diff)
use for fat binaries (on demand)
svn path=/trunk/externals/iem/iemmatrix/; revision=10996
-rw-r--r--src/Make.config.in5
-rw-r--r--src/Makefile6
-rw-r--r--src/configure.ac18
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'