patches/libgsm-01-makefile.diff
author drdoug007
Fri, 03 Aug 2007 14:12:14 +0000
changeset 368 4f17f8b5e830
child 7810 69230411510f
permissions -rw-r--r--
2007-08-30 Doug Scott <[email protected]> * SFEffmpeg.spec: Bumped export version Added codecs Created ffmpeg.pc * SFEamrnb.spec: *NEW* 3GPP AMR-NB Floating-point Speech Codec * SFEamrwb.spec: *NEW* 3GPP AMR-WB Floating-point Speech Codec * SFElibx264.spec: *NEW* H264 encoder library * SFExvid.spec: *NEW* ISO MPEG-4 compliant video codec * SFElibdts.spec: Build a shared library * SFEvlc.spec: Added devel and l10n Added options to better find codecs Added icons for app * SFEfoomatic-db-engine.spec: *NEW* Foomatic database Engine * SFEircii.spec: *NEW* irc client * SFElibgsm.spec: *NEW* GSM audio encoding/decoding library * SFElibmspack.spec: *NEW* library for Microsoft compression formats * SFEwine.spec: *NEW* bump to 0.9.42 * SFEnas.spec: *NEW* Network Audio System * SFEgutenprint.spec: *NEW* Guten Print * SFEcups.spec: *NEW* CUPS * SFEfoomatic-db.spec: *NEW* Foomatic database * patches/ffmpeg-02-configure.diff: Updated for new export * patches/cups-01-gss.diff: Fix gss configure for Solaris * patches/amrnb-01-patch.diff: Changed patch to gpatch * patches/libdts-02-shared.diff: Shared Library Build * patches/ffmpeg-01-BE_16.diff: Updated for new export * patches/vlc-07-live.diff: live555 patch * patches/vlc-10-real_codecs_path.diff: real codec path * patches/libmspack-01-wall.diff: remove -Wall * patches/foomatic-db-engine-01-perl.diff: Hack to find perl * patches/gutenprint-01-cups-version.diff: Hack to find cups 1.3rc3 * patches/ircii-01-config.diff: Config path patch * patches/libdts-03-opt.diff: Remove hardcoded opt flags * patches/vlc-08-osdmenu_path.diff: path patch * patches/amrwb-01-patch.diff: Changed patch to gpatch * patches/gutenprint-02-isfinite.diff: (double) * patches/wine-01-nameconfict.diff: Variable conflict * patches/ircii-02.cast.diff: Fix cast * patches/vlc-09-pic-mmx.diff: Added defined(__PIC__) * patches/foomatic-db-engine-02-null.diff: null check * patches/libgsm-01-makefile.diff: Solaris makefile patch * patches/xvid-01-solaris.diff: Solaris Patch

--- gsm-1.0-pl12/Makefile.orig	2007-08-01 13:16:42.866319697 +0700
+++ gsm-1.0-pl12/Makefile	2007-08-01 13:50:03.271259284 +0700
@@ -30,6 +30,8 @@
 ######### define this, and read about the GSM_OPT_WAV49 option in the
 ######### manual page on gsm_option(3).
 
+MAJOR=1
+
 # Choose a compiler.  The code works both with ANSI and K&R-C.
 # Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to
 # compile without, function prototypes in the header files.
@@ -43,8 +45,8 @@
 # CC		= /usr/lang/acc
 # CCFLAGS 	= -c -O
 
-CC		= gcc -ansi -pedantic
-CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
+# CC		= gcc -ansi -pedantic
+# CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
 
 LD 		= $(CC)
 
@@ -71,17 +73,17 @@
 # Leave INSTALL_ROOT empty (or just don't execute "make install") to
 # not install gsm and toast outside of this directory.
 
-INSTALL_ROOT	=
+# INSTALL_ROOT	=
 
 # Where do you want to install the gsm library, header file, and manpages?
 #
 # Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
 # this directory.
 
-GSM_INSTALL_ROOT = $(INSTALL_ROOT)
+GSM_INSTALL_ROOT = $(DESTDIR)$(INSTALL_ROOT)
 GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
+GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include
+GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
 
 
 # Where do you want to install the toast binaries and their manpage?
@@ -89,18 +91,18 @@
 # Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
 # of this directory.
 
-TOAST_INSTALL_ROOT	  = $(INSTALL_ROOT)
+TOAST_INSTALL_ROOT	  = $(DESTDIR)$(INSTALL_ROOT)
 TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
+TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
 
 #  Other tools
 
-SHELL		= /bin/sh
+SHELL		= /bin/bash
 LN		= ln
 BASENAME 	= basename
 AR		= ar
 ARFLAGS		= cr
-RMFLAGS		=
+RMFLAGS		= -f
 FIND		= find
 COMPRESS 	= compress
 COMPRESSFLAGS 	= 
@@ -129,7 +131,7 @@
 # DEBUG	= -DNDEBUG
 ######### Remove -DNDEBUG to enable assertions.
 
-CFLAGS	= $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
+CFLAGS	= -c $(PICFLAG) $(OPTFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
 	$(WAV49) $(CCINC) -I$(INC)
 ######### It's $(CC) $(CFLAGS)
 
@@ -139,7 +141,7 @@
 
 # Targets
 
-LIBGSM	= $(LIB)/libgsm.a
+LIBGSM	= $(LIB)/libgsm.so.$(MAJOR)
 
 TOAST	= $(BIN)/toast
 UNTOAST	= $(BIN)/untoast
@@ -257,7 +259,7 @@
 # Install targets
 
 GSM_INSTALL_TARGETS =	\
-		$(GSM_INSTALL_LIB)/libgsm.a		\
+		$(GSM_INSTALL_LIB)/libgsm.so.$(MAJOR)	\
 		$(GSM_INSTALL_INC)/gsm.h		\
 		$(GSM_INSTALL_MAN)/gsm.3		\
 		$(GSM_INSTALL_MAN)/gsm_explode.3	\
@@ -301,8 +303,7 @@
 
 $(LIBGSM):	$(LIB) $(GSM_OBJECTS)
 		-rm $(RMFLAGS) $(LIBGSM)
-		$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
-		$(RANLIB) $(LIBGSM)
+		$(LD) -G $(GSM_OBJECTS) -o $(LIBGSM) $(LDFLAGS)
 
 
 # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
@@ -393,9 +394,10 @@
 		cp $? $@
 		chmod 444 $@
 
-$(GSM_INSTALL_LIB)/libgsm.a:	$(LIBGSM)
+$(GSM_INSTALL_LIB)/libgsm.so.$(MAJOR):	$(LIBGSM)
 		-rm $@
 		cp $? $@
+		( cd $(GSM_INSTALL_LIB) ; ln -s libgsm.so.$(MAJOR) libgsm.so )
 		chmod 444 $@