Mercurial > mplayer.hg
annotate libdha/Makefile @ 7161:13bc391fc19c
mp_msg'ized
author | alex |
---|---|
date | Fri, 30 Aug 2002 11:20:51 +0000 |
parents | b69ddd4d3bb9 |
children | aa0536d98278 |
rev | line source |
---|---|
3973 | 1 # makefile |
2 | |
3 include ../config.mak | |
4 | |
5 VERSION = 0.1 | |
6 | |
4167 | 7 ifeq ($(TARGET_OS),CYGWIN) |
8 SHORTNAME = libdha.dll | |
9 else | |
3973 | 10 SHORTNAME = libdha.so |
4167 | 11 endif |
7005
40c596e65526
adds a soname and a shared library version number to libdha.
arpi
parents:
6628
diff
changeset
|
12 LIBNAME = libdha.so.$(VERSION) |
3973 | 13 |
4476 | 14 SRCS=libdha.c mtrr.c pci.c pci_names.c |
3973 | 15 OBJS=$(SRCS:.c=.o) |
16 | |
7073
b69ddd4d3bb9
removed -W -Wall -g and other gcc-specific warning/debug options
arpi
parents:
7005
diff
changeset
|
17 CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
18 LIBS = |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
19 ifeq ($(TARGET_OS),OpenBSD) |
6628
10131c2b3987
Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents:
6253
diff
changeset
|
20 ifeq ($(TARGET_ARCH_X86),yes) |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
21 LIBS += -li386 |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
22 endif |
6628
10131c2b3987
Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents:
6253
diff
changeset
|
23 endif |
3973 | 24 |
25 .SUFFIXES: .c .o | |
26 | |
27 # .PHONY: all clean | |
28 | |
29 .c.o: | |
30 $(CC) -c $(CFLAGS) -o $@ $< | |
31 | |
32 $(LIBNAME): $(OBJS) | |
7005
40c596e65526
adds a soname and a shared library version number to libdha.
arpi
parents:
6628
diff
changeset
|
33 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS) |
3973 | 34 ln -sf $(LIBNAME) $(SHORTNAME) |
35 | |
36 all: $(LIBNAME) $(SHORTNAME) | |
37 | |
4106 | 38 pci_names.c: |
6253
136c061fab12
pci.db is now uncompressed in cvs, sync with mplayerxp
arpi
parents:
6057
diff
changeset
|
39 $(AWK) -f pci_db2c.awk oth/pci.db |
4106 | 40 |
3973 | 41 test: |
42 $(CC) test.c -o test $(SHORTNAME) | |
43 | |
44 clean: | |
45 rm -f *.o *.so *~ | |
46 | |
47 distclean: | |
48 rm -f Makefile.bak *.o *.so test *~ .depend | |
4106 | 49 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db |
3973 | 50 |
51 dep: depend | |
52 | |
53 depend: | |
54 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend | |
55 | |
56 install: | |
4215 | 57 mkdir -p $(prefix)/lib |
58 install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME) | |
4030 | 59 rm -f $(prefix)/lib/libdha.so |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
60 ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME) |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
61 ifeq ($(TARGET_OS),OpenBSD) |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
62 ldconfig -R |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
63 else |
3973 | 64 ldconfig |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
65 endif |
3973 | 66 |
67 # | |
68 # include dependency files if they exist | |
69 # | |
70 ifneq ($(wildcard .depend),) | |
71 include .depend | |
72 endif |