Mercurial > hg > audiodb
changeset 374:6f2b31d9c186
The Makefile has been altered so that when running it on a darwin system
(i.e. Mac OS X) it will produce a dylib instead of an so with what I
believe are the correct conventions for such things. Note that the test suite does
not yet function with this dylib file.
author | map01bf |
---|---|
date | Fri, 14 Nov 2008 14:10:49 +0000 |
parents | cd63493c32a9 |
children | 336e4b74adc8 |
files | Makefile |
diffstat | 1 files changed, 17 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Thu Nov 13 17:09:51 2008 +0000 +++ b/Makefile Fri Nov 14 14:10:49 2008 +0000 @@ -6,6 +6,20 @@ GSL_INCLUDE= GSOAP_INCLUDE= +SHARED_LIB_FLAGS=-shared -Wl,-soname, + + + +LIBOBJS=insert.o create.o common.o dump.o query.o sample.o index.o lshlib.o cmdline.o +OBJS=$(LIBOBJS) soap.o audioDB.o + + +EXECUTABLE=audioDB + +SOVERSION=0 +MINORVERSION=0 +LIBRARY=lib$(EXECUTABLE).so.$(SOVERSION).$(MINORVERSION) + override CFLAGS+=-O3 -g -fPIC ifeq ($(shell uname),Linux) @@ -16,18 +30,10 @@ ifeq ($(shell sysctl -n hw.optional.x86_64),1) override CFLAGS+=-arch x86_64 endif +override SHARED_LIB_FLAGS=-dynamiclib -current_version $(SOVERSION).$(MINORVERSION) -Wl -install_name +override LIBRARY=lib$(EXECUTABLE).$(SOVERSION).$(MINORVERSION).dylib endif -LIBOBJS=insert.o create.o common.o dump.o query.o sample.o index.o lshlib.o cmdline.o -OBJS=$(LIBOBJS) soap.o audioDB.o - - -EXECUTABLE=audioDB - -SOVERSION=0 -MINORVERSION=0 -LIBRARY=lib$(EXECUTABLE).so.$(SOVERSION).$(MINORVERSION) - .PHONY: all clean test all: $(LIBRARY) $(EXECUTABLE) @@ -58,7 +64,7 @@ $(LIBRARY): $(LIBOBJS) audioDB_library.o - g++ -shared -Wl,-soname,lib$(EXECUTABLE).so.$(SOVERSION) -o $(LIBRARY) $(CFLAGS) $(LIBGSL) $^ + g++ $(SHARED_LIB_FLAGS)$(LIBRARY) -o $(LIBRARY) $(CFLAGS) $(LIBGSL) $^ tags: ctags *.cpp *.h