openbsd-ports/audio/mpg123/patches/patch-Makefile
naddy 4fd45d6e59 - cleanup, better CFLAGS/COPTS handling
- add esd flavor
- don't clobber xterm title
no response from maintainer; ok espie@
2001-04-24 00:48:12 +00:00

52 lines
1.5 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.2 2001/04/24 00:48:12 naddy Exp $
--- Makefile.orig Sat Apr 21 16:00:12 2001
+++ Makefile Sat Apr 21 16:02:43 2001
@@ -4,7 +4,7 @@
# Where to install binary and manpage on "make install":
-PREFIX=/usr/local
+PREFIX?=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/man
SECTION=1
@@ -54,6 +54,7 @@ nothing-specified:
@echo "make aix-tk3play IBM AIX"
@echo "make os2 IBM OS/2"
@echo "make netbsd NetBSD"
+ @echo "make openbsd OpenBSD"
@echo "make bsdos BSDI BSD/OS"
@echo "make bsdos4 BSDI BSD/OS 4.0"
@echo "make bsdos-nas BSDI BSD/OS with NAS support"
@@ -509,6 +510,30 @@ netbsd-i386:
-funroll-all-loops -ffast-math -DROT_I386 \
-DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DNETBSD' \
mpg123-make
+
+.if ${MACHINE_ARCH} == "i386"
+ARCHOPTS= -DROT_I386 -DI386_ASSEM
+ARCHOBJS= decode_i386.o dct64_i386.o
+.else
+ARCHOPTS=
+ARCHOBJS= decode.o dct64.o
+.endif
+
+openbsd:
+ ${MAKE} CC="${CC}" LDFLAGS= \
+ OBJECTS='${ARCHOBJS} audio_openbsd.o term.o' \
+ CFLAGS='-O3 -funroll-all-loops -ffast-math ${COPTS} \
+ ${ARCHOPTS} -DREAL_IS_FLOAT -DTERM_CONTROL \
+ -DINET6 -DUSE_MMAP -DOPENBSD' mpg123-make
+
+openbsd-esd:
+ ${MAKE} CC="${CC}" LDFLAGS='-L${LOCALBASE}/lib' \
+ AUDIO_LIB='-lesd -laudiofile' \
+ OBJECTS='${ARCHOBJS} audio_esd.o term.o' \
+ CFLAGS='-O3 -funroll-all-loops -ffast-math ${COPTS} \
+ ${ARCHOPTS} -I${LOCALBASE}/include \
+ -DREAL_IS_FLOAT -DTERM_CONTROL \
+ -DINET6 -DUSE_MMAP -DOPENBSD' mpg123-make
bsdos:
$(MAKE) CC=shlicc2 LDFLAGS= \