Enable 3DNow! support. You can set OPT_ARCH=3dnow to get an mpg123 with

3DNow! support, rather than teh default i586 support.

Approved by:	jkoshy
This commit is contained in:
Brian Feldman 2000-01-28 07:50:12 +00:00
parent a106a0d625
commit f92bd5bf9f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25157
2 changed files with 31 additions and 29 deletions

View file

@ -46,11 +46,12 @@ pre-configure:
@${ECHO_MSG} "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
.endif
.if $(MACHINE_ARCH) == "i386"
.if !defined(OPT_ARCH) || (($(OPT_ARCH) != "i486") && ($(OPT_ARCH) != "i586"))
.if !defined(OPT_ARCH) || (($(OPT_ARCH) != "i486") && ($(OPT_ARCH) != "i586") \
&& ($(OPT_ARCH) != "3dnow"))
@${ECHO_MSG} "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@${ECHO_MSG} "Note: you can set OPT_ARCH to optimize for your hardware. (Eg:- make OPT_ARCH=i486)"
.if $(PORTOBJFORMAT) == "elf"
@${ECHO_MSG} "Valid values are: i486, i586"
@${ECHO_MSG} "Valid values are: i486, i586, 3dnow"
.else
@${ECHO_MSG} "Valid values are: i486"
.endif

View file

@ -1,6 +1,6 @@
--- Makefile.orig Tue Jan 11 05:17:23 2000
+++ Makefile Tue Jan 11 05:18:07 2000
@@ -4,13 +4,15 @@
--- Makefile.orig Tue Jun 15 16:39:06 1999
+++ Makefile Sat Jan 15 15:54:59 2000
@@ -4,7 +4,7 @@
# Where to install binary and manpage on "make install":
@ -9,18 +9,9 @@
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,35 +302,42 @@
#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'
@@ -285,35 +285,51 @@
#CFLAGS='-DI386_ASSEM -O2 -DREAL_IS_FLOAT -DLINUX -Wall -g'
#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 =
@ -29,15 +20,23 @@
+.if defined(OPT_ARCH)
+.if (${OPT_ARCH} == "i486")
+ARCHOPT = -DI486_OPT
+ARCHFILES = decode_i486.o dct64_i486.o
+ARCHFILES = decode_i486.o dct64_i486.o dct64_i386.o
+.elif (${OPT_ARCH} == "i586")
+ARCHOPT = -DPENTIUM_OPT
+ARCHFILES = decode_i586.o
+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
+
+CFLAGS +=-Wall -ansi -pedantic -fomit-frame-pointer \
+ -funroll-all-loops -ffast-math -DROT_I386 \
+ -ffast-math -DROT_I386 \
+ -DREAD_MMAP \
+ -DI386_ASSEM ${ARCHOPT} -DREAL_IS_FLOAT -DUSE_MMAP -DOSS -DTERM_CONTROL
+
@ -49,40 +48,42 @@
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 \
- 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='decode_i386.o ${ARCHFILES} dct64_i386.o audio_oss.o term.o' \
mpg123-make
- mpg123-make
+ ${MAKE} OPT_ARCH=${OPT_ARCH} \
+ OBJECTS='decode_i386.o ${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 \
- 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='decode_i386.o ${ARCHFILES} dct64_i386.o audio_esd.o term.o' \
+ $(MAKE) OPT_ARCH=${OPT_ARCH} AUDIO_LIB='-lesd -laudiofile' \
+ OBJECTS='decode_i386.o ${ARCHFILES} audio_esd.o term.o' \
mpg123-make
freebsd-frontend:
- $(MAKE) CC=cc LDFLAGS= \
- OBJECTS='decode_i386.o dct64_i386.o audio_oss.o \
+ $(MAKE) OBJECTS='decode_i386.o ${ARCHFILES} dct64_i386.o audio_oss.o \
+ $(MAKE) OBJECTS='decode_i386.o ${ARCHFILES} audio_oss.o \
control_sajber.o control_tk3play.o' \
- CFLAGS='$(CFLAGS) -Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
- 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)
@@ -567,7 +576,7 @@
@@ -552,7 +568,7 @@
@ $(MAKE) CFLAGS='$(CFLAGS)' BINNAME=mpg123m mpg123
mpg123-make: