shithub: sox

ref: a9fddb06a4e0fba4ef9fd585626bd674b959934b
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@

# Shell commands.

CC	= @CC@
RANLIB	= @RANLIB@
INSTALL	= @INSTALL@
AR	= ar rcs
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

# Other macros.

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

# Sources.

FSRC	= 8svx.c aiff.c au.c auto.c cdr.c cvsd.c dat.c g711.c g721.c \
	  g723_24.c g723_40.c g72x.c gsm.c hcom.c maud.c raw.c \
	  sbdsp.c sf.c smp.c sndrtool.c tx16w.c voc.c wav.c wve.c

ESRC	= avg.c band.c chorus.c copy.c cut.c deemphas.c dyn.c echo.c echos.c \
	  flanger.c highp.c lowp.c map.c mask.c phaser.c pick.c \
	  polyphas.c rate.c resample.c reverb.c reverse.c split.c \
	  stat.c vibro.c 

OSSSRC_0    =
OSSSRC_1    = oss.c
SUNAUSRC_0  =
SUNAUSRC_1  = sunaudio.c
EXTRASRCS   = $(OSSSRC_$(NEED_OSS)) $(SUNAUSRC_$(NEED_SUNAU))

LIBSRCS	= $(FSRC) $(ESRC) handlers.c libst.c misc.c util.c $(EXTRASRCS)

# Objects.

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

EOBJ	= avg.o band.o chorus.o copy.o cut.o deemphas.o dyn.o echo.o echos.o \
	  flanger.o highp.o lowp.o map.o mask.o phaser.o pick.o \
	  polyphas.o rate.o resample.o reverb.o reverse.o split.o \
	  stat.o vibro.o

OSSOBJ_0    =
OSSOBJ_1    = oss.o
SUNAUOBJ_0  =
SUNAUOBJ_1  = sunaudio.o
EXTRAOBJS   = $(OSSOBJ_$(NEED_OSS)) $(SUNAUOBJ_$(NEED_SUNAU))

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

VPATH	= @srcdir@

.SUFFIXES:

%.o: %.c
	$(CC) $(CFLAGS) -c $<

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: sox.1 libst.3
	$(RM) sox.txt libst.txt
	nroff -man sox.1 | col -b > sox.txt
	nroff -man libst.3 | col -b > libst.txt

install: sox
	-$(INSTALL) -c -m 755 sox play rec $(BINDIR)
	-$(INSTALL) -c -m 644 sox.1 play.1 $(MANDIR)/man1

install-lib: libst.a
	-$(INSTALL) -c -m 644 libst.a $(LIBDIR)
	-$(INSTALL) -c -m 644 libst.3 $(MANDIR)/man3

dep depend:
	$(CC) $(CFLAGS) -MM $(addprefix $(srcdir)/,$(LIBSRCS)) > .depend
	$(CC) $(CFLAGS) -MM $(srcdir)/sox.c >> .depend

clean:
	$(RM) *.o

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

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

ifeq (.depend,$(wildcard .depend))
include .depend
endif