diff options
author | bustico | 2008-04-09 14:43:42 +0000 |
---|---|---|
committer | bustico | 2008-04-09 14:43:42 +0000 |
commit | c5f385388ee7c73a991cf1c31c17521df88b5022 (patch) | |
tree | b329a32666107085f7bbb92f593ed97af5e0d7f3 /src | |
parent | 734fb0009ae34c1c34ca2f4b5ea985a95be14e52 (diff) | |
download | ivy-c-c5f385388ee7c73a991cf1c31c17521df88b5022.zip ivy-c-c5f385388ee7c73a991cf1c31c17521df88b5022.tar.gz ivy-c-c5f385388ee7c73a991cf1c31c17521df88b5022.tar.bz2 ivy-c-c5f385388ee7c73a991cf1c31c17521df88b5022.tar.xz |
update macosx Makefile for omp lib and tools
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.osx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Makefile.osx b/src/Makefile.osx index 1a0e42f..c95cf90 100644 --- a/src/Makefile.osx +++ b/src/Makefile.osx @@ -23,10 +23,21 @@ endif REGEXP= -DUSE_PCRE_REGEX -DPCRE_OPT=$(PCRE_OPT) OBJ = ivyloop.o timer.o ivysocket.o ivy.o ivybuffer.o ivyfifo.o ivybind.o intervalRegexp.o +OMPOBJ = ivyloop.o timer.o ivysocket_omp.o ivy_omp.o ivybuffer.o ivyfifo.o ivybind.o intervalRegexp.o + CC=gcc LIBTOOL=ar q # linux and solaris CFLAGS = -g -Wall $(FPIC) TOOLS_DIR = ../tools + +# you should first install gcc version >= 4.3 +# gcc (g++) 4.3 is the first gcc version which support openmp under macosx +# using macport greatly simplify gcc install : port install gcc43 +OMPCC = gcc-mp-4.3 +OMPCPP = g++-mp-4.3 +OMPCFLAGS = $(CFLAGS) -fopenmp -DOPENMP=1 +OMPLIB = -lgomp -lpthread + # ------------------------------------------------------------------------------------------ .c.o: @@ -37,6 +48,9 @@ TOOLS_DIR = ../tools all: static-libs shared-libs tools +libomp: libivy_omp.a +omp: libomp + @(cd $(TOOLS_DIR) && $(MAKE) -f Makefile.osx omp) static-libs: libivy.a @@ -45,13 +59,27 @@ shared-libs: libivy.dylib ivybind.o: ivybind.c $(CC) -c $(CFLAGS) $(REGEXP) $(PCREINC) ivybind.c +ivy_omp.o: ivy.c + $(OMPCC) -c $(OMPCFLAGS) -o ivy_omp.o ivy.c + +ivysocket_omp.o: ivysocket.c + $(OMPCC) -c $(OMPCFLAGS) -o ivysocket_omp.o ivysocket.c + + libivy.a: $(OBJ) rm -f $@ $(LIBTOOL) $@ $(OBJ) +libivy_omp.a: $(OMPOBJ) + rm -f $@ + $(LIBTOOL) $@ $(OMPOBJ) + libivy.dylib: $(OBJ) $(CC) -dynamiclib -o $@ $(OBJ) $(PCRELIB) +libivy_omp.dylib: $(OMPOBJ) + $(OMPCC) -dynamiclib -o $@ $(OMPOBJ) $(PCRELIB) $(OMPLIB) + # ------------------------------------------------------------------------------------------ installlibs: static-libs shared-libs |