blob: c5f2305731aee606c229c4637b59fc68c98ba3d1 (
plain) (
blame)
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
|
--- Makefile.orig Wed Sep 15 21:14:24 2004
+++ Makefile Wed Sep 15 21:14:41 2004
@@ -4,13 +4,15 @@
# Where to install binary and manpage on "make install":
-PREFIX=/usr/local
+#PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/man
SECTION=1
# Enable the below line If your plathome support IPv6
-#CFLAGS+= -DINET6
+.if defined(USE_INET6)
+CFLAGS+= -DINET6
+.endif
# Additional LIBDIR and libraries if exist
IPV6LIBDIR=
IPV6LIB=
@@ -300,6 +302,9 @@
#CFLAGS='$(CFLAGS) -DI386_ASSEM -O2 -DREAL_IS_FLOAT -DLINUX -Wall -g'
#CFLAGS='$(CFLAGS) -DI386_ASSEM -DREAL_IS_FLOAT -DLINUX -Wall -O2 -m486 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2'
+CC ?= cc
+LDFLAGS =
+
.if defined(WITH_ICONV)
CFLAGS+=-DWITH_ICONV -I${LOCALBASE}/include
LDFLAGS+=-L${LOCALBASE}/lib -liconv
@@ -308,35 +313,62 @@
.endif
.endif
+.if ${MACHINE_ARCH} == "i386"
+ARCHOPT= -funroll-all-loops -ffast-math -fomit-frame-pointer \
+ -DROT_I386 -DI386_ASSEM -DREAL_IS_FLOAT
+ARCHFILES= decode_i386.o
+CFLAGS ?=-O4 -m486
+.if !defined(OPT_ARCH)
+ARCHFILES+= dct64_i386.c
+.else
+.if (${OPT_ARCH} == "i486")
+ARCHOPT+= -DI486_OPT
+ARCHFILES+= decode_i486.o dct64_i486.o dct64_i386.o
+.elif (${OPT_ARCH} == "i586")
+ARCHOPT+= -DPENTIUM_OPT
+ARCHFILES+= decode_i586.o dct64_i386.o
+.elif (${OPT_ARCH} == "3dnow")
+ARCHOPT+= -DPENTIUM_OPT -DUSE_3DNOW
+ARCHFILES+= dct64_3dnow.o decode_3dnow.o
+dct64_3dnow.o:
+ ${INSTALL} ./precompiled/linux-i386/dct64_3dnow.o .
+decode_3dnow.o:
+ ${INSTALL} ./precompiled/linux-i386/decode_3dnow.o .
+.endif
+.endif
+.else
+ARCHOPT= -funroll-loops
+ARCHFILES= decode.o dct64.o
+.endif
+
+CFLAGS +=-Wall -ansi -pedantic ${ARCHOPT} \
+ -DREAD_MMAP -DUSE_MMAP -DOSS -DTERM_CONTROL
+
+.if defined(HAVE_ESOUND)
+CFLAGS +=-I${LOCALBASE}/include
+LDFLAGS+=-L${LOCALBASE}/lib
+.elif defined(HAVE_NAS)
+CFLAGS +=-I${X11BASE}/include -DNAS
+LDFLAGS+=-L${X11BASE}/lib
+.endif
+
freebsd:
- $(MAKE) CC=cc LDFLAGS= \
- OBJECTS='decode_i386.o dct64_i386.o audio_oss.o' \
- CFLAGS='$(CFLAGS) -Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
- -funroll-all-loops -ffast-math -DROT_I386 \
- -DREAD_MMAP \
- -DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DOSS' \
+ ${MAKE} OBJECTS='${ARCHFILES} audio_oss.o term.o' \
mpg123-make
freebsd-esd:
- $(MAKE) CC=cc LDFLAGS= \
- AUDIO_LIB='-lesd -laudiofile' \
- OBJECTS='decode_i386.o dct64_i386.o $(GETBITS) audio_esd.o' \
- CFLAGS='$(CFLAGS) -Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
- -funroll-all-loops -ffast-math -DROT_I386 \
- -DREAD_MMAP \
- -DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DOSS \
- -I/usr/local/include -L/usr/local/lib \
- $(CFLAGS)' \
+ $(MAKE) AUDIO_LIB='-lesd -laudiofile' \
+ OBJECTS='${ARCHFILES} audio_esd.o term.o' \
+ mpg123-make
+
+freebsd-nas:
+ $(MAKE) AUDIO_LIB='-laudio -lXau -lXt' \
+ OBJECTS='${ARCHFILES} audio_nas.o term.o' \
mpg123-make
freebsd-frontend:
- $(MAKE) CC=cc LDFLAGS= \
- OBJECTS='decode_i386.o dct64_i386.o audio_oss.o \
+ $(MAKE) OBJECTS='${ARCHFILES} audio_oss.o \
control_sajber.o control_tk3play.o' \
- CFLAGS='$(CFLAGS) -Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
- -funroll-all-loops -ffast-math -DROT_I386 \
- -DFRONTEND \
- -DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DOSS' \
$(FRONTEND)
@@ -575,7 +607,7 @@
@ $(MAKE) CFLAGS='$(CFLAGS)' BINNAME=mpg123m mpg123
mpg123-make:
- @ $(MAKE) CFLAGS='$(CFLAGS)' BINNAME=mpg123 mpg123
+ @ $(MAKE) LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' BINNAME=mpg123 mpg123
mpg123: mpg123.o common.o $(OBJECTS) decode_2to1.o decode_4to1.o \
tabinit.o audio.o layer1.o layer2.o layer3.o buffer.o \
|