File: makefile

package info (click to toggle)
drc 3.2.0~dfsg0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,204 kB
  • sloc: ansic: 14,154; cpp: 8,919; sh: 253; makefile: 41
file content (100 lines) | stat: -rw-r--r-- 3,252 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
# DRC base makefile

# DRC version
VERSION=3.1.0

# Where to install
INSTALL_PREFIX=$(DESTDIR)/usr

# Compiler
CC=gcc

# Standard optimization settings
# Tested also on Mac OS X
# CFLAGS=-O -I. 

# Standard optimization settings, for systems missing getopt
# CFLAGS=-O -I. -I./getopt

# i686 optimizaztions settings
# CFLAGS=-march=pentium3 -O -mfancy-math-387 -msse -mtune=pentium3 -I. 

# Pentium 3 or greater optimizaztions settings with SSE support
# Be careful: -mfpmath=sse sometimes causes accuracy problems
CFLAGS=-O -I.

# Same as above, but tested on recent Mac OS X
# Be careful: -mfpmath=sse sometimes causes accuracy problems
# CFLAGS=-march=pentium3 -O -m32 -mfancy-math-387 -msse -mfpmath=sse -mtune=pentium3 -I. 

# Athlon64 settings
# CFLAGS=-march=athlon64 -O3 -fPIC -I. 

# Vectorization settings (GCC 4 Only, experimental, only partially working)
# CFLAGS=-march=pentium3 -O -pg -g -mfancy-math-387 -msse -mfpmath=sse -mtune=pentium3 -ftree-vectorize -ftree-vectorizer-verbose=2 -I. 

# GLSweep optimization settings
# GLSweep doesn't need SSE based optimization settings
GLSCFLAGS=-O -I.

# Debug settings

# Warning check pedantic settings
# CFLAGS=-Wall -pedantic -I.

# Profiling settings
# CFLAGS=-march=pentium3 -O -pg -g -mfancy-math-387 -msse -mfpmath=sse -mtune=pentium3 -I. 

# DRC sources
DRCSRC=baselib.cpp drc.cpp fft.cpp hd.cpp slprefilt.cpp bwprefilt.cpp convol.cpp dspwind.cpp spline.cpp fir.cpp level.cpp toeplitz.cpp kirkebyfd.cpp drccfg.cpp psychoacoustic.cpp cmdline.c parsecfg.c fftsg.c gsl/gsl_fft.c gsl/error.c gsl/stream.c

# DRC sources for systems missing getopt
# DRCSRC=baselib.cpp drc.cpp fft.cpp hd.cpp slprefilt.cpp bwprefilt.cpp convol.cpp dspwind.cpp spline.cpp fir.cpp level.cpp toeplitz.cpp kirkebyfd.cpp drccfg.cpp psychoacoustic.cpp cmdline.c parsecfg.c fftsg.c getopt/getopt.c getopt/getopt1.c gsl/gsl_fft.c gsl/error.c gsl/stream.c

# GLSweep sources
GLSWEEPSRC=glsweep.c

# LSConv sources
LSCONVSRC=lsconv.c fftsg_h.c

# Compiled objects
OBJS=drc lsconv glsweep

# Installation definitions
CONFIG_TARGETS=config/*
TARGET_TARGETS=target/*
MIC_TARGETS=mic/*
IMPULSE_TARGETS=../sample/rs.pcm
DOC_TARGETS=readme.txt
BIN_TARGETS=drc lsconv glsweep

# Targets

ALL: drc glsweep lsconv

drc: $(DRCSRC)
	$(CC) $(CFLAGS) -o drc $(DRCSRC) -lm -lstdc++

glsweep: $(GLSWEEPSRC)
	$(CC) $(GLSCFLAGS) -o glsweep $(GLSWEEPSRC) -lm
	
lsconv: $(LSCONVSRC)
	$(CC) $(CFLAGS) -o lsconv $(LSCONVSRC) -lm
	
clean:
	rm -f $(OBJS)

install: $(CONFIG_TARGETS) $(TARGET_TARGETS) $(MIC_TARGETS) $(IMPULSE_TARGETS) $(DOC_TARGETS) $(BIN_TARGETS)
	install -d $(INSTALL_PREFIX)/bin/
	install $(BIN_TARGETS) $(INSTALL_PREFIX)/bin/
	install -d $(INSTALL_PREFIX)/share/drc/config/
	cp -ar -t $(INSTALL_PREFIX)/share/drc/config/ $(CONFIG_TARGETS)
	install -d $(INSTALL_PREFIX)/share/drc/target/
	cp -ar -t $(INSTALL_PREFIX)/share/drc/target/ $(TARGET_TARGETS)
	install -d $(INSTALL_PREFIX)/share/drc/mic/
	cp -ar -t $(INSTALL_PREFIX)/share/drc/mic/ $(MIC_TARGETS)
	install -d $(INSTALL_PREFIX)/share/drc/impulse/
	install $(IMPULSE_TARGETS) $(INSTALL_PREFIX)/share/drc/impulse/
	install -d $(INSTALL_PREFIX)/share/drc/filter/
	install -d $(INSTALL_PREFIX)/share/doc/drc/
	install $(DOC_TARGETS) $(INSTALL_PREFIX)/share/doc/drc/