*** src/Makefile.gcc.org	Thu Jun 29 23:59:50 2006
--- src/Makefile.gcc	Fri Oct 20 21:13:00 2006
***************
*** 4,21 ****
  # 	builds libst.a, sox, soxmix, and play
  #
  # To use this Makefile, first copy stconfig.h.in to stconfig.h and modify
! # that file to reflect your environment.  This will should also be modified
  # to reflect your build environment.
  #   
  
! # These things are site dependant so you may want to change.
  PREFIX	= /usr/local
  bindir  = $(PREFIX)/bin
  libdir	= $(PREFIX)/lib
  mandir  = $(PREFIX)/man
  incdir	= $(PREFIX)/include
  
! SRCDIR	= sox-12.17.3
  
  ##############################################################################
  
--- 4,22 ----
  # 	builds libst.a, sox, soxmix, and play
  #
  # To use this Makefile, first copy stconfig.h.in to stconfig.h and modify
! # that file to reflect your environment.  This should also be modified
  # to reflect your build environment.
  #   
+ SHELL=/bin/sh
  
! # These things are site dependent so you may want to change.
  PREFIX	= /usr/local
  bindir  = $(PREFIX)/bin
  libdir	= $(PREFIX)/lib
  mandir  = $(PREFIX)/man
  incdir	= $(PREFIX)/include
  
! SRCDIR	= sox-12.18.2
  
  ##############################################################################
  
***************
*** 52,58 ****
  # Chose the best compiler you got from the following:
  #
  # GCC with all warnings and debug info
! CC		= gcc -g -Wall
  #
  # GCC with no special options
  # CC		= gcc
--- 53,62 ----
  # Chose the best compiler you got from the following:
  #
  # GCC with all warnings and debug info
! # CC		= gcc -g -Wall
! # GCC with all warnings but without debug info, it inflates the
! # executables from 300kB to over 1 MB.
! CC		= gcc -s -Wall
  #
  # GCC with no special options
  # CC		= gcc
***************
*** 63,68 ****
--- 67,76 ----
  # EMX GCC under OS/2 seems to need the following
  # CC		= gcc -Zcrtdll -Zexe
  
+ # LD Flags to get ld to strip the executable, otherwise we have more
+ # than one MB to deal with.
+ LDFLAGS		= -s
+ 
  # For optimized compilation, uncomment one of the following that your
  # compiler understands.
  #
***************
*** 84,93 ****
  AR		= ar r
  
  # How should 'ranlib' be performed. HPUX, Linux, BSD-ish, SunOS, Solaris
! RANLIB		= ranlib
  
  # AT&T System V and GCC on DOS or OS/2 based systems
! # RANLIB	= ar ts
  
  # Some systems don't have a ranlib that you can run.  Use the following
  # for those systems.
--- 92,101 ----
  AR		= ar r
  
  # How should 'ranlib' be performed. HPUX, Linux, BSD-ish, SunOS, Solaris
! # RANLIB		= ranlib
  
  # AT&T System V and GCC on DOS or OS/2 based systems
! RANLIB	= ar ts
  
  # Some systems don't have a ranlib that you can run.  Use the following
  # for those systems.
***************
*** 105,127 ****
  
  ##############################################################################
  
! SOX_PRE_LIBS    = -L./gsm
! SOX_POST_LIBS	= -lgsm $(VORBISLIB) $(MP3LIB) $(MATHLIB)
  SOX_INCLUDES    =
  SOX_DEFINES	= -DGSM_SUPPORT $(DOS_DEFINES)
  
  CFLAGS  = $O $(SOX_DEFINES) $(SOX_INCLUDES)
  
! all: sox soxmix
  
! sox: sox.o $(SOUNDLIB) gsm/libgsm.a
! 	$(CC) $(CFLAGS) -o sox sox.o $(SOUNDLIB) $(SOX_PRE_LIBS) $(SOX_POST_LIBS)
  
  soxmix.o: sox.c
! 	$(CC) $(CLAGS) -DSOXMIX -c -o soxmix.o sox.c
  
! soxmix: soxmix.o $(SOUNDLIB) gsm/libgsm.a
! 	$(CC) $(CFLAGS) -o soxmix soxmix.o $(SOUNDLIB) $(SOX_PRE_LIBS) $(SOX_POST_LIBS)
  
  play: play.in
  	$(SED) -e 's|@PREFIX@|$(bindir)|g' < $(srcdir)/play.in > play
--- 113,136 ----
  
  ##############################################################################
  
! LIBPRE		= lib
! SOX_PRE_LIBS    = -L./$(LIBPRE)gsm
! SOX_POST_LIBS	= -l$(LIBPRE)gsm $(VORBISLIB) $(MP3LIB) $(MATHLIB)
  SOX_INCLUDES    =
  SOX_DEFINES	= -DGSM_SUPPORT $(DOS_DEFINES)
  
  CFLAGS  = $O $(SOX_DEFINES) $(SOX_INCLUDES)
  
! all: sox$(EXE) soxmix$(EXE)
  
! sox$(EXE): sox.o $(SOUNDLIB) $(LIBPRE)gsm/$(LIBPRE)gsm.a
! 	$(CC) $(CFLAGS) -o sox$(EXE) sox.o $(SOUNDLIB) $(SOX_PRE_LIBS) $(SOX_POST_LIBS)
  
  soxmix.o: sox.c
! 	$(CC) $(CLAGS) $(LDFLAGS) -DSOXMIX -c -o soxmix.o sox.c
  
! soxmix$(EXE): soxmix.o $(SOUNDLIB) $(LIBPRE)gsm/$(LIBPRE)gsm.a
! 	$(CC) $(CFLAGS) $(LDFLAGS) -o soxmix$(EXE) soxmix.o $(SOUNDLIB) $(SOX_PRE_LIBS) $(SOX_POST_LIBS)
  
  play: play.in
  	$(SED) -e 's|@PREFIX@|$(bindir)|g' < $(srcdir)/play.in > play
***************
*** 131,138 ****
  	$(AR) $(SOUNDLIB) $(LIBOBJS)
  	$(RANLIB) $(SOUNDLIB)
  
! gsm/libgsm.a:
! 	cd gsm && $(MAKE)
  
  sox.o:		sox.c st.h
  
--- 140,147 ----
  	$(AR) $(SOUNDLIB) $(LIBOBJS)
  	$(RANLIB) $(SOUNDLIB)
  
! $(LIBPRE)gsm/$(LIBPRE)gsm.a:
! 	cd $(LIBPRE)gsm && $(MAKE) -f Makefile.gcc
  
  sox.o:		sox.c st.h
  
***************
*** 143,151 ****
  	nroff -man soxexam.1 | col -b > soxexam.txt
  	nroff -man libst.3 | col -b > libst.txt
  
! install: sox soxmix
! 	$(INSTALL) -c -m 755 sox $(bindir)
! 	$(INSTALL) -c -m 755 sox play $(bindir)
  	$(INSTALL) -c -m 644 sox.1 $(mandir)/man1
  	if [ -f $(mandir)/man1/soxmmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
  	$(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
--- 152,160 ----
  	nroff -man soxexam.1 | col -b > soxexam.txt
  	nroff -man libst.3 | col -b > libst.txt
  
! install: sox$(EXE) soxmix$(EXE)
! 	$(INSTALL) -c -m 755 sox$(EXE) $(bindir)
! 	$(INSTALL) -c -m 755 soxmix$(EXE) play $(bindir)
  	$(INSTALL) -c -m 644 sox.1 $(mandir)/man1
  	if [ -f $(mandir)/man1/soxmmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
  	$(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
***************
*** 166,172 ****
  	install -c -m 644 ststdint.h $(incdir)
  
  clean:
! 	$(RM) *~ *.o *.raw *.sf core sox soxmix libst.a
  
  tar:	clean
  	$(RM) ../$(SRCDIR).tar
--- 175,181 ----
  	install -c -m 644 ststdint.h $(incdir)
  
  clean:
! 	$(RM) *~ *.o *.raw *.sf core sox$(EXE) soxmix$(EXE) libst.a
  
  tar:	clean
  	$(RM) ../$(SRCDIR).tar


*** src/libgsm/Makefile.gcc.org	Sun Aug 27 23:04:56 2006
--- src/libgsm/Makefile.gcc	Fri Oct 20 21:12:22 2006
***************
*** 17,23 ****
  # Shell commands.
  
  CC	= gcc
! RANLIB  = ranlib
  AR      = ar r
  RM	= rm -f
  
--- 17,24 ----
  # Shell commands.
  
  CC	= gcc
! # RANLIB  = ranlib
! RANLIB  = ar ts
  AR      = ar r
  RM	= rm -f
  
***************
*** 49,55 ****
  
  # Build macros.
  
! CFLAGS	= -g -O2 -Wall -DOSS_PLAYER -DFAST_ULAW_CONVERSION -DFAST_ALAW_CONVERSION -DENABLE_GSM -DHAVE_CONFIG_H $(SASR) $(MULHAC) $(FAST) $(LTP_CUT) $(WAV49) -I$(top_srcdir)/gsm
  LDFLAGS	= 
  LIBS	= -lm  -logg -lvorbis -lvorbisfile -lvorbisenc -lgsm
  
--- 50,58 ----
  
  # Build macros.
  
! # CFLAGS	= -g -O2 -Wall -DOSS_PLAYER -DFAST_ULAW_CONVERSION -DFAST_ALAW_CONVERSION -DENABLE_GSM -DHAVE_CONFIG_H $(SASR) $(MULHAC) $(FAST) $(LTP_CUT) $(WAV49) -I$(top_srcdir)/gsm
! # Do not include debug information, it inflates the executables
! CFLAGS	= -s -O2 -Wall -DOSS_PLAYER -DFAST_ULAW_CONVERSION -DFAST_ALAW_CONVERSION -DENABLE_GSM -DHAVE_CONFIG_H $(SASR) $(MULHAC) $(FAST) $(LTP_CUT) $(WAV49) -I$(top_srcdir)/gsm
  LDFLAGS	= 
  LIBS	= -lm  -logg -lvorbis -lvorbisfile -lvorbisenc -lgsm
  
