$OpenBSD: patch-libdha_Makefile,v 1.5 2002/05/15 22:27:01 pvalchev Exp $ --- libdha/Makefile.orig Sun May 12 04:18:50 2002 +++ libdha/Makefile Wed May 15 00:45:06 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: gzip -d -c oth/pci.db.gz >pci.db @@ -55,8 +60,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