# HG changeset patch # User map01bf # Date 1226671849 0 # Node ID 6f2b31d9c1860bc47e02a10f9b996489ac26e72a # Parent cd63493c32a9f2f4545b3ccb662f016bf0ace1e3 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. diff -r cd63493c32a9 -r 6f2b31d9c186 Makefile --- 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