shithub: sox

ref: f903855ad3e8e8e67e5b60c3e58bfe92678a8ac4
dir: /src/Makefile.in/

View raw version
#
# Makefile.in
#
# Processed by configure into a Makefile.  We assume the environment in
# which we are running is a POSIX'y environment.  Thus, all of the standard
# POSIX tools are available.
#   

SHELL = /bin/sh
srcdir = @srcdir@
prefix = @prefix@

# Shell commands.

CC	= @CC@
RANLIB	= @RANLIB@
INSTALL	= @INSTALL@
AR	= ar r
TAR	= tar
RM	= rm -f

# Build macros.

CFLAGS	= @CFLAGS@ @DEFS@ -I$(srcdir)
LDFLAGS	= @LDFLAGS@
LIBS	= @LIBS@

# Install directories

BINDIR  = $(prefix)/bin
LIBDIR	= $(prefix)/lib
MANDIR  = $(prefix)/man
INCDIR	= $(prefix)/include

# Other macros.

NEED_OSS     = @NEED_OSS@
NEED_SUNAU   = @NEED_SUNAU@
NEED_ALSA    = @NEED_ALSA@
PLAY_SUPPORT = @PLAY_SUPPORT@

# Objects.

FOBJ	= 8svx.o adpcm.o aiff.o au.o auto.o avr.o cdr.o cvsd.o dat.o g721.o \
	  g723_24.o g723_40.o g72x.o gsm.o hcom.o ima_rw.o maud.o raw.o \
	  sf.o smp.o sndrtool.o sphere.o tx16w.o voc.o wav.o wve.o

EOBJ	= avg.o band.o bandpass.o breject.o btrworth.o chorus.o compand.o \
	  copy.o cut.o deemphas.o echo.o echos.o filter.o flanger.o \
	  highp.o highpass.o lowp.o lowpass.o map.o mask.o pan.o \
	  phaser.o pick.o pitch.o polyphas.o rate.o resample.o reverb.o \
	  reverse.o speed.o split.o stat.o stretch.o swap.o trim.o \
	  vibro.o vol.o trim.o

OSSOBJ_0    =
OSSOBJ_1    = oss.o
SUNAUOBJ_0  =
SUNAUOBJ_1  = sunaudio.o
ALSAOBJ_0   =
ALSAOBJ_1   = alsa.o
EXTRAOBJS   = $(OSSOBJ_$(NEED_OSS)) $(SUNAUOBJ_$(NEED_SUNAU)) $(ALSAOBJ_$(NEED_ALSA))

LIBOBJS = $(FOBJ) $(EOBJ) handlers.o libst.o misc.o util.o getopt.o $(EXTRAOBJS)

VPATH	= @srcdir@

all: sox

sox: libst.a sox.o
	$(CC) $(LDFLAGS) -o sox sox.o $(LIBS)

libst.a: $(LIBOBJS)
	$(AR) libst.a $(LIBOBJS)
	$(RANLIB) libst.a

man: $(srcdir)/sox.1 $(srcdir)/soxexam.1 $(srcdir)/libst.3
	nroff -man $(srcdir)/sox.1 | col -b > sox.txt
	nroff -man $(srcdir)/soxexam.1 | col -b > soxexam.txt
	nroff -man $(srcdir)/libst.3 | col -b > libst.txt

PLAY_INSTALL_0    =
PLAY_INSTALL_1    = install-play

install: sox $(PLAY_INSTALL_$(PLAY_SUPPORT))
	$(srcdir)/mkinstalldirs $(BINDIR)
	$(srcdir)/mkinstalldirs $(MANDIR)/man1
	$(INSTALL) -c -m 755 sox $(BINDIR)
	$(INSTALL) -c -m 644 $(srcdir)/sox.1 $(MANDIR)/man1
	$(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(MANDIR)/man1

install-play:
	if [ -f $(BINDIR)/rec ] ; then $(RM) $(BINDIR)/rec; fi
	if [ -f $(MANDIR)/man1/rec.1 ]; then $(RM) $(MANDIR)/man1/rec.1; fi
	$(srcdir)/mkinstalldirs $(MANDIR)/man1
	$(srcdir)/mkinstalldirs $(BINDIR)
	$(INSTALL) -c -m 755 $(srcdir)/play $(BINDIR)
	$(INSTALL) -c -m 644 $(srcdir)/play.1 $(MANDIR)/man1
	ln -s $(BINDIR)/play $(BINDIR)/rec
	ln -s $(MANDIR)/man1/play.1 $(MANDIR)/man1/rec.1

install-lib: libst.a
	$(srcdir)/mkinstalldirs $(LIBDIR)/man1
	$(srcdir)/mkinstalldirs $(MANDIR)/man3
	$(srcdir)/mkinstalldirs $(INCDIR)
	$(INSTALL) -c -m 644 libst.a $(LIBDIR)
	$(RANLIB) $(LIBDIR)/libst.a
	$(INSTALL) -c -m 644 libst.3 $(MANDIR)/man3
	$(INSTALL) -c -m 644 st.h $(INCDIR)

clean:
	$(RM) *.o

distclean:
	$(RM) *~ *.o *.raw *.sf core sox libst.a
	$(RM) config.cache config.log config.status config.h Makefile

tar:
	cd $(srcdir)/..; $(RM) $(pkgname).tar
	cd $(srcdir)/.. ; $(TAR) $(pkgname).tar $(srcdir)