shithub: sox

ref: 2ae81f2e51b709c1a1af75ba99b08197ff06ed3a
dir: /src/Makefile.dos/

View raw version
# Sound Tools Makefile - builds libst.lib and sox.exe
#
#   Short and Sweat makefile - cbagwell@sprynet.com 9/28/98
#   With a little editing this makefile should compile under both
#   pre and post Borland 3.0.
#
#   Also some support for MS VC based on info from Mark Morgan Lloyd
#   <markMLl.in@telemetry.co.uk> 1/24/99
#
#   NOTE: This Makefile does not support compiling GSM currently.
#
# Need object files to know what libst.lib depends on.  All .c files
# are compiled from default rules of make.

FOBJ	= 8svx.obj adpcm.obj aiff.obj alsa.obj au.obj auto.obj \
          avr.obj cdr.obj cvsd.obj dat.obj g711.obj g721.obj g723_16.obj \
	  g723_24.obj g723_40.obj g72x.obj gsm.obj \
	  hcom.obj ima_rw.obj maud.obj mp3.obj nulfile.obj oss.obj prc.obj \
	  raw.obj sf.obj smp.obj sndrtool.obj sphere.obj sunaudio.obj \
	  tx16w.obj voc.obj vorbis.obj vox.obj wav.obj wve.obj

EOBJ	= avg.obj band.obj bandpass.obj breject.obj btrworth.obj chorus.obj \
	  compand.obj copy.obj dcshift.obj deemphas.obj earwax.o \
	  echo.obj echos.obj fade.obj filter.obj flanger.obj highp.obj \
	  highpass.obj lowp.obj lowpass.obj mask.obj mcompand.obj phaser.obj \
	  pitch.obj pan.obj polyphase.obj rate.obj repeat.obj resample.obj \
	  reverb.obj reverse.obj silence.obj speed.obj stat.obj \
	  stretch.obj swap.obj synth.obj trim.obj vibro.obj vol.obj

LIBOBJS   = $(FOBJ) $(EOBJ) handlers.obj misc.obj getopt.obj util.obj


# The following defines tell where compiler files are kept, not where
# things should be installed like Unix usually specifies.  If your using
# Microsoft Compilers then you don't need these.
BINDIR  = c:\tc
LIBDIR  = c:\tc\lib
INCDIR  = c:\tc\include

#BINDIR	= d:\bc\bin
#LIBDIR	= d:\bc\lib
#INCDIR	= d:\bc\include

# Standard Borland options for Huge Memory Mode (more than 64k for both
# code and data), Word aligned, compile to Objects only, Speed and Jump
# optimized.
# -v is for debuging and -N is to add stack corruption detection code.
# both add unneeded size to code.
#
# Pick one of the next two defines for pre/post Borland C 3.0
CC      = $(BINDIR)\tcc
#CC      = $(BINDIR)\bcc
LDD	= $(BINDIR)\tlib
CFLAGS  = -DDOS -D__STDC__=1 -a -c -mh -G -O -v -N
LFLAGS  = -v -mh

.c.obj:
	$(CC) $(CFLAGS) -I$(INCDIR) -L$(LIBDIR) $*.c
	$(LDD) libst -$* +$*

# MS VC needs the following. /AL uses large memory model.
#CC	= cl
#LDD	= lib
#CFLAGS	= -DDOS -D__STDC__=1 -c -O /AL /Gt8192
#LFLAGS	= /AL /Gt8192

# When using MS VC, comment out above rule for .c.obj and use this as well
#.c.obj:
#       $(CC) $(CFLAGS) $*.c
#       $(LDD) libst -+$*,,

all: sox.exe soxmix.exe

sox.exe: sox.obj libst.lib
	$(CC) $(LFLAGS) -L$(LIBDIR) sox.obj libst.lib

soxmix.exe: soxmix.obj libst.lib
	$(CC) $(LFLAGS) -L$(LIBDIR) soxmix.obj libst.lib

libst.lib: $(LIBOBJS)

sox.obj: sox.c st.h
	$(CC) $(CFLAGS) -I$(INCDIR) -L$(LIBDIR) $*.c

soxmix.obj: sox.c st.h
	$(CC) $(CFLAGS) -DSOXMIX -I$(INCDIR) -L$(LIBDIR) sox.c

clean:
	del *.obj
	del sox.exe
	del soxmix.exe
	del libst.lib