File: Makefile

package info (click to toggle)
sox 11gamma-cb3-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 980 kB
  • ctags: 1,240
  • sloc: ansic: 14,222; sh: 159; makefile: 136
file content (230 lines) | stat: -rw-r--r-- 6,293 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#
# Sound Tools Makefile
#
# 	builds libst.a and sox
#
# Last updated on 02/24/97 - by Chris Bagwell (cbagwell@sprynet.com)
#   Inhanced Makefile to install software and documented a little better.
#   Remember, make is here to help out not slow you down. :-)

# These things are site dependant so you may want to change.
BINDIR    = $(PREFIX)/usr/bin
MANDIR    = $(PREFIX)/usr/man

SRCDIR	  = sox-11gamma-cb3

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 hcom.c maud.c oss.c raw.c sbdsp.c \
	    sf.c smp.c sndrtool.c sunaudio.c voc.c wav.c wve.c

ESRC	  = copy.c avg.c pred.c stat.c vibro.c echo.c rate.c band.c lowp.c \
	    highp.c reverse.c dyn.c cut.c map.c split.c pick.c mask.c \
	    resample.c 

PSRC      = sox.c

SOURCES   = $(PSRC) $(FSRC) $(ESRC) handlers.c libst.c misc.c util.c getopt.c

HEADERS   = st.h libst.h sfheader.h sfircam.h patchlvl.h version.h wav.h \
	    g72x.h resdefs.h resampl.h

TESTS     = tests.sh testall.sh monkey.au monkey.voc

MISC      = README README2 INSTALL TODO TIPS CHEAT sox.1 sox.txt libst.3 \
	    libst.txt Makefile.unx Makefile.bor Makefile.b30 Makefile.c70 \
	    sbprog.doc sox.sh play rec

SKEL	  = skel.c skeleff.c

VMS       = descrip.mms sound2au.com sound2sun.c sound2sun.opt \
	    sox.opt tests.com vms.lis

NT 	  = sox.nt

OS2	  = MakeOS2 MakeOS2.dep

OS9	  = Makefile.os9

AMIGA	  = Makefile.ami amiga.c amiga.h

ACORN	  = Makefile.arc Setup armfloor.c armceil.c

FILES     = $(MISC) $(HEADERS) $(SOURCES) \
	    $(VMS) $(AMIGA) $(NT) $(OS2) $(OS9) $(ACORN) \
	    $(SKEL) $(TESTS)

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 hcom.o maud.o oss.o raw.o sbdsp.o \
	    sf.o smp.o sndrtool.o sunaudio.o voc.o wav.o wve.o

EOBJ	  = copy.o avg.o pred.o stat.o vibro.o echo.o rate.o band.o lowp.o \
	    highp.o reverse.o dyn.o cut.o map.o split.o pick.o mask.o \
	    resample.o 

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

#
# System dependency parameters
#   Starting to grow.  Find your system and uncomment defines.
#
# Your system  may need to define which shell to use.
# SHELL	  = /bin/sh
#
# Define how to delete a file on your system.
RM	    = rm -f
# For DOS uses this.
#RM	     = del /q

# include -DSYSV for AT&T Unix System V and Solaris
#
# define -DNEED_GETOPT to use the enclosed getopt() library.
# To use the system getopt() and getopt.h, don't define NEED_GETOPT
#
# define -DNEED_STRERROR if you don't have a built-in strerror().
#
# define -DBLASTER to use the Sound Blaster device driver
# on a 386 AT&T Unix with it installed
#
# define -DSBLAST to use Steve Haenichen's SBLAST
# driver on any BSD-derived Unix for 386/486 PC's
# BSDI's BSD386, Jolitz 386BSD, or Mt Xinu's Mach-386
#
# define -DOSS_PLAYER to use OSS Unix sound driver on any
# unix platform that supports it (Linux, Sun, others)
#
# define -DSUNAUDIO_PLAYER to use Sun Audio driver on a SunOS 4.x.x
# or Solaris 2.x (SunOS 5.x.x) system.
#
# define -DDOS  to compile on PC
# defines .snd to mean a DOS soundtool file (starts with SOUND)
#
# define -DNeXT on a NeXT workstation
# defines .snd to mean a NeXT sound format file
#  	only knows a few real sound formats.
#
# define -DMAC on a MacIntosh
# defines .snd to mean a Mac-style headerless unsigned byte
#  	sample, probably at 11050 hertz.  You'll have to set 
#	the speed on the command line.

# My AT&T System V/386 development parameters

# CC	    = cc -Dunix
# CC        = gcc -fpcc-struct-return -ansi -Dunix
# O	    = -g
# CFLAGS    = $O -DSYSV -DBLASTER -Di386 -DNEED_GETOPT -DNEED_STRERROR
# AR        = ar r
# RANLIB    = ar ts

# AT&T System V

# Gcc is better, of course, if you have it
# CC        = gcc -ansi -Dunix -fpcc-struct-return 
# CC        = cc -Dunix
# O	    = -g
# CFLAGS    = $O -DSYSV  -DNEED_GETOPT -DNEED_STRERROR
# AR        = ar r
# RANLIB    = ar ts

# IBM AIX 3.2

# CC        = xlc -D_ALL_SOURCE -Dunix
# O	    = -g
# CFLAGS    = $O -DSYSV 
# AR        = ar r
# RANLIB    = ar ts

# BSD-ish, salt to taste
# Sun, NeXT, Vax, Ultrix uses these
# Sun's can add -DSUNAUDIO_PLAYER for playing sounds

# CC        = gcc -ansi -Dunix 
# CC        = cc -Dunix
# O	    = -O2
# CFLAGS    = $O -DNEED_GETOPT -DNEED_STRERROR -DSUNAUDIO_PLAYER
#  maybe -DNEED_STRERROR
# AR        = ar r
# RANLIB    = ranlib

# Solaris 2.x systems
# Can add -DSUNAUDIO_PLAYER for playing sounds

# CC        = gcc -ansi -Dunix 
# CC        = cc -Dunix
# O         = -O2
# CFLAGS    = $O -DSYSV -DNEED_STRERROR -DSUNAUDIO_PLAYER
# AR        = ar -r
# RANLIB    = true

# BSD-386, Mach 386, 386BSD, use for SBLAST driver

# CC        = gcc -ansi -Dunix 
# O         = -O2    # Optimization Flags
# CFLAGS    = $O -I/usr/src/sys -DSBLAST -DNEED_GETOPT
#  maybe -DNEED_STRERROR
# AR        = ar r
# RANLIB    = ranlib

# linux (with soundcard support -DOSS_PLAYER)

CC	    = gcc -fpcc-struct-return
O           = -O2
CFLAGS	    = $(O) -DOSS_PLAYER -DNEED_GETOPT
AR	    = ar r
RANLIB	    = ranlib

# HPUX (no hardware support, though)
# include -Aa in CFLAGS if the source ever supports ANSI C

# CC          = cc
# O           = -O2
# CFLAGS      = $O -D_HPUX_SOURCE
# AR          = ar r
# RANLIB      = ranlib

# GCC on DOS based systems (DJGPP)

# CC      = gcc
# O         = -O2
# CFLAGS  = $O -DDOS -ansi -I./sox
# AR      = ar r
# RANLIB  = ar ts

all: sox

sox: sox.o $(SOUNDLIB)
	$(CC) $(CFLAGS) -o sox sox.o $(SOUNDLIB) -lm

$(SOUNDLIB): $(LIBOBJS)
	$(RM) $(SOUNDLIB)
	$(AR) $(SOUNDLIB) $(LIBOBJS)
	$(RANLIB) $(SOUNDLIB)

sox.o:		sox.c st.h

$(LIBOBJS):	st.h version.h patchlvl.h

man: sox.1 libst.3
	$(RM) sox.txt libst.txt
	nroff -man sox.1 | col > sox.txt
	nroff -man libst.3 | col > libst.txt

install: sox
	-install -c -m 755 sox $(BINDIR)
	-install -c -m 644 sox.1 $(MANDIR)/man1
	-install -c -m 755 play $(BINDIR)
	-install -c -m 644 play.1 $(MANDIR)/man1
#	-install -c -m 644 libst.3 $(MANDIR)/man3

clean:
	$(RM) *~ *.o *.raw *.sf core sox libst.a

# Shar: -F (prefix all lines with X), 
# 	-s addr (set return addr of poster)
shar: $(FILES)
	/usr2/tools/shar/shar -M -F -l 50 -o shar -n soundtools_v11 -s thinman@netcom.com $(FILES)

tar:	clean
	$(RM) ../$(SRCDIR).tar
	cd ..; tar cvf $(SRCDIR).tar $(SRCDIR)