Mercurial > mplayer.hg
annotate libdha/Makefile @ 8975:e0a3139a4dea
10l
author | pontscho |
---|---|
date | Fri, 17 Jan 2003 23:29:14 +0000 |
parents | 55e80f13c826 |
children | 60d1ccf22469 |
rev | line source |
---|---|
3973 | 1 # makefile |
2 | |
3 include ../config.mak | |
4 | |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
5 MAJOR_VERSION = 0 |
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
6 MINOR_VERSION = 1 |
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
7 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION) |
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
8 |
3973 | 9 |
4167 | 10 ifeq ($(TARGET_OS),CYGWIN) |
11 SHORTNAME = libdha.dll | |
12 else | |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
13 SHORTNAME = libdha.so.$(MAJOR_VERSION) |
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
14 SONAME_FLAGS = -Wl,-soname,$(SHORTNAME) |
7824
ef5f2f54c231
really fix latest fix. But now this versioning stopped making sense to me.
eyck
parents:
7812
diff
changeset
|
15 #SHORTNAME = libdha.so |
ef5f2f54c231
really fix latest fix. But now this versioning stopped making sense to me.
eyck
parents:
7812
diff
changeset
|
16 VSHORTNAME = libdha.so |
4167 | 17 endif |
7005
40c596e65526
adds a soname and a shared library version number to libdha.
arpi
parents:
6628
diff
changeset
|
18 LIBNAME = libdha.so.$(VERSION) |
3973 | 19 |
4476 | 20 SRCS=libdha.c mtrr.c pci.c pci_names.c |
3973 | 21 OBJS=$(SRCS:.c=.o) |
22 | |
7073
b69ddd4d3bb9
removed -W -Wall -g and other gcc-specific warning/debug options
arpi
parents:
7005
diff
changeset
|
23 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
|
24 LIBS = |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
25 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
|
26 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
|
27 LIBS += -li386 |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
28 endif |
6628
10131c2b3987
Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents:
6253
diff
changeset
|
29 endif |
3973 | 30 |
8503
9dbb9c710480
svgalib kernelhelper support (based on patch by Matan Ziv-Av <matan@svgalib.org>) and some reordering/cleanup (part #1 ;)
alex
parents:
8461
diff
changeset
|
31 # If you want libdha to use svgalib_helper for hardware access, |
9dbb9c710480
svgalib kernelhelper support (based on patch by Matan Ziv-Av <matan@svgalib.org>) and some reordering/cleanup (part #1 ;)
alex
parents:
8461
diff
changeset
|
32 # uncomment this statement, and change the -I to the correct directory |
9dbb9c710480
svgalib kernelhelper support (based on patch by Matan Ziv-Av <matan@svgalib.org>) and some reordering/cleanup (part #1 ;)
alex
parents:
8461
diff
changeset
|
33 # that includes svgalib_helper.o: |
9dbb9c710480
svgalib kernelhelper support (based on patch by Matan Ziv-Av <matan@svgalib.org>) and some reordering/cleanup (part #1 ;)
alex
parents:
8461
diff
changeset
|
34 #CFLAGS += -DDEV_SVGA=\"/dev/svga\" -DCONFIG_SVGAHELPER -Isvgalib_helper/ |
9dbb9c710480
svgalib kernelhelper support (based on patch by Matan Ziv-Av <matan@svgalib.org>) and some reordering/cleanup (part #1 ;)
alex
parents:
8461
diff
changeset
|
35 |
3973 | 36 .SUFFIXES: .c .o |
37 | |
38 # .PHONY: all clean | |
39 | |
8506 | 40 .c.o: pci_names.c |
3973 | 41 $(CC) -c $(CFLAGS) -o $@ $< |
42 | |
43 $(LIBNAME): $(OBJS) | |
7812 | 44 #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS) |
45 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS) | |
3973 | 46 ln -sf $(LIBNAME) $(SHORTNAME) |
7824
ef5f2f54c231
really fix latest fix. But now this versioning stopped making sense to me.
eyck
parents:
7812
diff
changeset
|
47 ln -sf $(LIBNAME) $(VSHORTNAME) |
3973 | 48 |
49 all: $(LIBNAME) $(SHORTNAME) | |
50 | |
4106 | 51 pci_names.c: |
6253
136c061fab12
pci.db is now uncompressed in cvs, sync with mplayerxp
arpi
parents:
6057
diff
changeset
|
52 $(AWK) -f pci_db2c.awk oth/pci.db |
4106 | 53 |
3973 | 54 test: |
55 $(CC) test.c -o test $(SHORTNAME) | |
56 | |
57 clean: | |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
58 rm -f *.o *.so *.so.* *~ |
3973 | 59 |
60 distclean: | |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
61 rm -f Makefile.bak *.o *.so *.so.* test *~ .depend |
4106 | 62 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db |
3973 | 63 |
64 dep: depend | |
65 | |
8506 | 66 depend: pci_names.c |
3973 | 67 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend |
68 | |
69 install: | |
4215 | 70 mkdir -p $(prefix)/lib |
71 install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME) | |
4030 | 72 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
|
73 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
|
74 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
|
75 ldconfig -R |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
76 else |
3973 | 77 ldconfig |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
78 endif |
3973 | 79 |
8461 | 80 uninstall: |
81 rm -f $(prefix)/lib/libdha.so $(prefix)/lib/$(SHORTNAME) $(prefix)/lib/$(LIBNAME) | |
82 ifeq ($(TARGET_OS),OpenBSD) | |
83 ldconfig -R | |
84 else | |
85 ldconfig | |
86 endif | |
87 | |
3973 | 88 # |
89 # include dependency files if they exist | |
90 # | |
91 ifneq ($(wildcard .depend),) | |
92 include .depend | |
93 endif |