-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
65 lines (51 loc) · 1.54 KB
/
Makefile
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
#
# Linux
#
CC = gcc
#
# Flags:
#
# DEBUG_CHECK Extra checking of bitstream data
# OUTPUT_SOUND Write sound data to /dev/dsp
# OUTPUT_RAW Write sound data to <filename>.raw
# OUTPUT_DBG Write clear-text debug dumps to stdout
#CFLAGS = -g -O4 -funroll-loops -Wall -ansi -DOUTPUT_SOUND
#CFLAGS = -O4 -funroll-loops -Wall -ansi -DOUTPUT_RAW
#CFLAGS = -O4 -funroll-loops -Wall -ansi -DOUTPUT_DBG
CFLAGS = -Os -ffunction-sections -fdata-sections \
-finline-small-functions -finline-functions-called-once \
-fno-unwind-tables -fno-asynchronous-unwind-tables \
-ffast-math -fassociative-math -fomit-frame-pointer -ffinite-math-only \
-fno-math-errno -fno-trapping-math -freciprocal-math -frounding-math \
-funsafe-loop-optimizations -funsafe-math-optimizations \
-DOUTPUT_SOUND -DIMDCT_TABLES -DIMDCT_NTABLES -DPOW34_TABLE
LDFLAGS = -Wl,--gc-sections,--as-needed,-s
OBJS = pdmp3.o main.o
all: pdmp3
pdmp3: $(OBJS)
$(CC) $(CFLAGS) -o pdmp3 $(OBJS) $(LDFLAGS) -lm
@echo
@echo "********** Made pdmp3 **********"
@echo
#
# Install the decoder and utilities to /usr/local/bin.
# This probably needs to be done as root.
#
install: pdmp3
cp pdmp3 /usr/local/bin
depend:
gcc -MM $(CFLAGS) *.c > make.depend
clean:
-rm -f *.o *~ core TAGS *.wav *.bin
realclean: clean
-rm -f pdmp3 *.pdf *.ps *.bit
etags:
etags *.c *.h
print:
-rm -f app_b.ps
a2ps --medium=a4 -G2r --left-title="" \
--header="Appendix B, Reference Decoder and Simulation Source Code" \
--file-align=fill \
main.c -oapp_b.ps pdmp3.c
-rm -f app_b.pdf
ps2pdf app_b.ps