parameterize static and shared library suffixes
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 14 Aug 2002 00:50:48 +0000 (00:50 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 14 Aug 2002 00:50:48 +0000 (00:50 +0000)
build/lib.mk

index d5ed237..45d4f23 100644 (file)
@@ -28,19 +28,20 @@ CCC         = g++
 endif
 NASM        = nasm
 LINK        = ar cru
+LIBPATH     = ../../obj/lib
 ifeq ($(DARWIN_BUILD),yes)
-LINKD       = $(CC) -dynamiclib -flat_namespace -undefined suppress -install_name ../../obj/lib/libFLAC.dylib
-#LINKD       = $(CC) -dynamiclib -flat_namespace -undefined suppress -install_name ../../obj/lib/libFLAC.1.dylib -compatibility_version 3 -current_version 3.1
+STATIC_LIB_SUFFIX = a
+DYNAMIC_LIB_SUFFIX = dylib
 else
-LINKD       = ld -G
+STATIC_LIB_SUFFIX = a
+DYNAMIC_LIB_SUFFIX = so
 endif
-LIBPATH     = ../../obj/lib
-STATIC_LIB  = $(LIBPATH)/$(LIB_NAME).a
+STATIC_LIB  = $(LIBPATH)/$(LIB_NAME).$(STATIC_LIB_SUFFIX)
+DYNAMIC_LIB = $(LIBPATH)/$(LIB_NAME).$(DYNAMIC_LIB_SUFFIX)
 ifeq ($(DARWIN_BUILD),yes)
-DYNAMIC_LIB = $(LIBPATH)/$(LIB_NAME).dylib
-#DYNAMIC_LIB = $(LIBPATH)/$(LIB_NAME).1.1.1.dylib
+LINKD       = $(CC) -dynamiclib -flat_namespace -undefined suppress -install_name $(DYNAMIC_LIB)
 else
-DYNAMIC_LIB = $(LIBPATH)/$(LIB_NAME).so
+LINKD       = ld -G
 endif
 
 all : release