openbsd-ports/x11/mplayer/patches/patch-libdha_Makefile
espie f1c812e4fc Update to 0.90pre5
Most work by Biorn, some testing by pval and me.
2002-06-27 22:03:49 +00:00

56 lines
1.3 KiB
Plaintext

$OpenBSD: patch-libdha_Makefile,v 1.6 2002/06/27 22:03:49 espie Exp $
--- libdha/Makefile.orig Sat Jun 1 00:41:01 2002
+++ libdha/Makefile Wed Jun 12 16:09:48 2002
@@ -7,9 +7,13 @@ VERSION = 0.1
ifeq ($(TARGET_OS),CYGWIN)
SHORTNAME = libdha.dll
else
+ifeq ($(TARGET_OS),OpenBSD)
+SHORTNAME = libdha.so.0.1
+else
SHORTNAME = libdha.so
endif
-LIBNAME = libdha-$(VERSION).so
+endif
+LIBNAME = $(SHORTNAME)
SRCS=libdha.c mtrr.c pci.c pci_names.c
OBJS=$(SRCS:.c=.o)
@@ -17,21 +21,22 @@ OBJS=$(SRCS:.c=.o)
CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
LIBS =
ifeq ($(TARGET_OS),OpenBSD)
+ifeq ($(TARGET_ARCH_X86),yes)
LIBS += -li386
endif
+endif
.SUFFIXES: .c .o
# .PHONY: all clean
.c.o:
- $(CC) -c $(CFLAGS) -o $@ $<
+ PATH=/bin:/usr/bin $(CC) -c $(CFLAGS) -o $@ $<
$(LIBNAME): $(OBJS)
$(CC) -shared -o $(LIBNAME) $(OBJS) $(LIBS)
- ln -sf $(LIBNAME) $(SHORTNAME)
-all: $(LIBNAME) $(SHORTNAME)
+all: $(LIBNAME)
pci_names.c:
$(AWK) -f pci_db2c.awk oth/pci.db
@@ -54,8 +59,8 @@ depend:
install:
mkdir -p $(prefix)/lib
install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME)
- rm -f $(prefix)/lib/libdha.so
- ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME)
+# rm -f $(prefix)/lib/libdha.so
+# ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME)
ifeq ($(TARGET_OS),OpenBSD)
ldconfig -R
else