comparison libdha/Makefile @ 6057:31e465fda59c

various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
author arpi
date Sun, 12 May 2002 02:18:52 +0000
parents 0d9a096cfd46
children 136c061fab12
comparison
equal deleted inserted replaced
6056:f980563afdbc 6057:31e465fda59c
13 13
14 SRCS=libdha.c mtrr.c pci.c pci_names.c 14 SRCS=libdha.c mtrr.c pci.c pci_names.c
15 OBJS=$(SRCS:.c=.o) 15 OBJS=$(SRCS:.c=.o)
16 16
17 CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W 17 CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
18 LIBS =
19 ifeq ($(TARGET_OS),OpenBSD)
20 LIBS += -li386
21 endif
18 22
19 .SUFFIXES: .c .o 23 .SUFFIXES: .c .o
20 24
21 # .PHONY: all clean 25 # .PHONY: all clean
22 26
23 .c.o: 27 .c.o:
24 $(CC) -c $(CFLAGS) -o $@ $< 28 $(CC) -c $(CFLAGS) -o $@ $<
25 29
26 $(LIBNAME): $(OBJS) 30 $(LIBNAME): $(OBJS)
27 $(CC) -shared -o $(LIBNAME) $(OBJS) 31 $(CC) -shared -o $(LIBNAME) $(OBJS) $(LIBS)
28 ln -sf $(LIBNAME) $(SHORTNAME) 32 ln -sf $(LIBNAME) $(SHORTNAME)
29 33
30 all: $(LIBNAME) $(SHORTNAME) 34 all: $(LIBNAME) $(SHORTNAME)
31 35
32 pci_names.c: 36 pci_names.c:
50 54
51 install: 55 install:
52 mkdir -p $(prefix)/lib 56 mkdir -p $(prefix)/lib
53 install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME) 57 install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME)
54 rm -f $(prefix)/lib/libdha.so 58 rm -f $(prefix)/lib/libdha.so
55 ln -sf $(LIBNAME) $(prefix)/lib/libdha.so 59 ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME)
60 ifeq ($(TARGET_OS),OpenBSD)
61 ldconfig -R
62 else
56 ldconfig 63 ldconfig
64 endif
57 65
58 # 66 #
59 # include dependency files if they exist 67 # include dependency files if they exist
60 # 68 #
61 ifneq ($(wildcard .depend),) 69 ifneq ($(wildcard .depend),)