Add optional NAS support.

Submitted by:	Christian Weisgerber <naddy@mips.inka.de>
This commit is contained in:
Maxim Sobolev 2001-02-27 12:39:16 +00:00
parent 43562fcc52
commit fd77c885bf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38851
2 changed files with 32 additions and 8 deletions

View file

@ -25,6 +25,12 @@ MAINTAINER= sobomax@freebsd.org
WANT_ESOUND= yes
.if defined(WITH_NAS)
HAVE_NAS= yes
LIB_DEPENDS= audio.1:${PORTSDIR}/audio/nas
MAKE_ENV+= HAVE_NAS=${HAVE_NAS}
.endif
MAN1= mpg123.1
.include <bsd.port.pre.mk>
@ -36,22 +42,32 @@ MAKE_ENV+= USE_INET6=yes
.if defined(HAVE_ESOUND)
USE_ESOUND= yes
ALL_TARGET= freebsd-esd
.elif defined(HAVE_NAS)
PKGNAMESUFFIX= -nas
ALL_TARGET= freebsd-nas
.else
ALL_TARGET= freebsd
.endif
pre-configure:
pre-fetch:
.if !defined(WITH_NAS)
@${ECHO_MSG}
@${ECHO_MSG} "If you want to compile with NAS support,"
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_NAS=yes\""
@${ECHO_MSG}
.endif
.if ${MACHINE_ARCH} == "i386"
.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)"
@${ECHO_MSG}
@${ECHO_MSG} "Note: you can set OPT_ARCH to optimize for your hardware"
@${ECHO_MSG} "(e.g. make OPT_ARCH=i486)."
.if ${PORTOBJFORMAT} == "elf"
@${ECHO_MSG} "Valid values are: i486, i586, 3dnow"
.else
@${ECHO_MSG} "Valid values are: i486"
.endif
@${ECHO_MSG} "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@${ECHO_MSG}
.endif
.if ${PORTOBJFORMAT} == "elf"
OPT_ARCH?= i586

View file

@ -1,5 +1,5 @@
--- Makefile.orig Fri May 5 00:07:57 2000
+++ Makefile Fri May 5 00:13:05 2000
--- Makefile.orig Sun Dec 17 02:23:13 2000
+++ Makefile Sun Dec 17 02:26:42 2000
@@ -4,13 +4,15 @@
# Where to install binary and manpage on "make install":
@ -18,7 +18,7 @@
# Additional LIBDIR and libraries if exist
IPV6LIBDIR=
IPV6LIB=
@@ -300,35 +302,55 @@
@@ -300,35 +302,63 @@
#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'
@ -57,6 +57,9 @@
+.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:
@ -81,6 +84,11 @@
- $(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:
@ -95,7 +103,7 @@
$(FRONTEND)
@@ -567,7 +589,7 @@
@@ -567,7 +597,7 @@
@ $(MAKE) CFLAGS='$(CFLAGS)' BINNAME=mpg123m mpg123
mpg123-make: