openbsd-ports/audio/mpg123/patches/patch-Makefile
2006-04-05 19:19:29 +00:00

60 lines
1.8 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.6 2006/04/05 19:19:29 jolan Exp $
--- Makefile.orig Wed Apr 5 14:14:35 2006
+++ Makefile Wed Apr 5 14:15:21 2006
@@ -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"
@@ -510,6 +511,30 @@ netbsd-i386:
-DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DNETBSD' \
mpg123-make
+.if ${MACHINE_ARCH} == "i386"
+ARCHOPTS= -DROT_I386 -DI386_ASSEM -DPENTIUM_OPT
+ARCHOBJS= decode_i386.o decode_i586.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='${CFLAGS} ${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= \
OBJECTS='decode_i386.o dct64_i386.o \
@@ -642,7 +667,6 @@ system: mpg123.h system.c
$(CC) -o $@ -Wall -O2 system.c
install: prepared-for-install
- strip mpg123
if [ -x /usr/ccs/bin/mcs ]; then /usr/ccs/bin/mcs -d mpg123; fi
mkdir -p $(BINDIR)
mkdir -p $(MANDIR)/man$(SECTION)