File: Makefile

package info (click to toggle)
siggen 2.3.10-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,032 kB
  • sloc: ansic: 5,545; makefile: 188; sh: 79
file content (150 lines) | stat: -rw-r--r-- 3,425 bytes parent folder | download | duplicates (4)
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
#
# Makefile for jj's siggen  .....

SHELL		= /bin/sh

# Version of siggen

V	= 2.3

# Edit PROGS to make the programs you want. You may wish to omit smix
#  if you do not want yet another mixer program.
PROGS		= tones signalgen swgen siggen sweepgen fsynth soundinfo smix

#
TEXTS		= tones.txt sgen.txt swgen.txt siggen.txt sweepgen.txt soundinfo.txt smix.txt fsynth.txt siggen.conf.txt

#
# simple command line programs......
TONES		= tones.o tonesgen.o generator.o misc.o wavfile.o wavsubs.o DAC.o configsubs.o
SGEN		= sgen.o generator.o misc.o wavfile.o wavsubs.o DAC.o configsubs.o
SWGEN		= swgen.o generator.o misc.o wavfile.o wavsubs.o DAC.o configsubs.o
SMIX		= smix.o mixer.o configsubs.o
#
# curses based programs......
FSYNTH		= fsynth.o fsynscr.o scrsubs.o generator.o misc.o DAC.o scfio.o configsubs.o
SIGGEN		= siggen.o sigscr.o scrsubs.o generator.o misc.o DAC.o scfio.o configsubs.o
SWEEPGEN	= sweepgen.o sweepscr.o scrsubs.o generator.o misc.o DAC.o scfio.o configsubs.o
#
srcdir		= .
includedir	= /usr/include/ncurses
INSDIR		= /usr/local/bin
MANDIR		= /usr/local/man
LOCALINS	= $(HOME)/bin
LOCALMAN	= $(HOME)/man

CC		= gcc
CFLAGS		=  -O2  
CPPFLAGS	= -I. -I$(includedir)

CCFLAGS		= $(CFLAGS) $(CPPFLAGS)

LINK		= $(CC)
LDFLAGS		= -lncurses -lm

.c.o:	config.h
	$(CC) -c $(CCFLAGS) $<

all:	$(PROGS) $(TEXTS) 

text:	$(TEXTS)

%.txt:	%.5
	nroff -man $< | col -b -x > $@

%.txt:	%.1
	nroff -man $< | col -b -x > $@

mixer.o:	mixer.c mixer.h

smix.o:		smix.c mixer.h config.h

scfio.o:	scfio.c scfio.h

scrsubs.o:	scrsubs.c scfio.h config.h

sigscr.o:	sigscr.c scfio.h config.h siggen.h

sigscr-1.o:	sigscr-1.c scfio.h config.h

sweepscr.o:	sweepscr.c scfio.h config.h sweepgen.h

fsynscr.o:	fsynscr.c scfio.h fsynth.h config.h

fsynth.o:	fsynth.c fsynth.h config.h

install:
	@echo "2 install options :-"
	@echo "    make sysinstall"
	@echo "         into $(INSDIR) and $(MANDIR)"
	@echo "    make localinstall"
	@echo "         into $(LOCALINS) and $(LOCALMAN)"

localinstall: $(PROGS)
	@strip $(PROGS)
	@chmod 755 $(PROGS)
	@echo "Copying $(PROGS) to $(LOCALINS)"
	@cp -p $(PROGS) $(LOCALINS)
	@for n in $(PROGS) ; do \
	chmod 644 $$n.1 ; \
	echo "Copying $$n.1 to $(LOCALMAN)/man1/$$n.1" ; \
	cp -p $$n.1 $(LOCALMAN)/man1/$$n.1 ; \
	done
	@cp -p siggen.conf.5 $(LOCALMAN)/man5
	@chmod 644 $(LOCALMAN)/man5/siggen.conf.5

sysinstall: $(PROGS)
	@strip $(PROGS)
	@chmod 755 $(PROGS)
	@echo "Copying $(PROGS) to $(INSDIR)"
	@cp -p $(PROGS) $(INSDIR)
	@for n in $(PROGS) ; do \
	chmod 644 $$n.1 ; \
	echo "Copying $$n.1 to $(MANDIR)/man1/$$n.1" ; \
	cp -p $$n.1 $(MANDIR)/man1/$$n.1 ; \
	done
	@cp -p siggen.conf.5 $(MANDIR)/man5
	@chmod 644 $(MANDIR)/man5/siggen.conf.5

nodac:
	make -f Makefile.NODAC all

vu:	$(VU)
	$(CC)  $(VU) -o $@

soundinfo:	soundinfo.o
	$(CC)  $@.o -o $@

signalgen: $(SGEN)
	$(CC)  $(SGEN) -lm -o $@

swgen:	$(SWGEN)
	$(CC)  $(SWGEN) -lm -o $@

tones:	$(TONES)
	$(CC)  $(TONES) -lm -o $@

fsynth:	$(FSYNTH) fsynth.h
	$(CC) $(FSYNTH) $(LDFLAGS) -o $@

siggen:	$(SIGGEN) siggen.h
	$(CC) $(SIGGEN) $(LDFLAGS) -o $@

siggen-1: $(SIGGEN1) siggen.h
	$(CC) -DVERSION1 $(SIGGEN1) $(LDFLAGS) -o $@

sweepgen: $(SWEEPGEN) sweepgen.h
	$(CC) $(SWEEPGEN) $(LDFLAGS) -o $@

smix:	$(SMIX) mixer.h
	$(CC) $(SMIX) $(LDFLAGS) -o $@

clean:
	rm -rf *.o $(PROGS) $(TEXTS) *~ 

dist:
	make clean
	(cd tones.eg; make clean)
	(cd contrib; make clean)
	(d=`basename $$PWD` ; cd .. ; tar cfz $$d.tgz $$d)