Mercurial > mplayer.hg
annotate libdha/Makefile @ 18147:0b0db513c5aa
spellcheck revealed 2 more typos..
author | kraymer |
---|---|
date | Wed, 19 Apr 2006 10:28:49 +0000 |
parents | b069afd2a0de |
children | 4f71ed7cb512 |
rev | line source |
---|---|
3973 | 1 # makefile |
2 | |
3 include ../config.mak | |
4 | |
12692
797e602bf1dd
make the awk script working for localized machines too, patch by Onur Kucuk
alex
parents:
12069
diff
changeset
|
5 MAJOR_VERSION = 1 |
797e602bf1dd
make the awk script working for localized machines too, patch by Onur Kucuk
alex
parents:
12069
diff
changeset
|
6 MINOR_VERSION = 0 |
7811
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 |
12069 | 18 ifeq ($(TARGET_WIN32),yes) |
11238 | 19 LIBNAME = libdha.a |
20 SHORTNAME = libdha.a | |
21 else | |
7005
40c596e65526
adds a soname and a shared library version number to libdha.
arpi
parents:
6628
diff
changeset
|
22 LIBNAME = libdha.so.$(VERSION) |
11238 | 23 endif |
3973 | 24 |
17943
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
25 SRCS=libdha.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
26 mtrr.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
27 pci.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
28 pci_names.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
29 |
3973 | 30 OBJS=$(SRCS:.c=.o) |
31 | |
7073
b69ddd4d3bb9
removed -W -Wall -g and other gcc-specific warning/debug options
arpi
parents:
7005
diff
changeset
|
32 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
|
33 LIBS = |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
34 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
|
35 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
|
36 LIBS += -li386 |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
37 endif |
6628
10131c2b3987
Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents:
6253
diff
changeset
|
38 endif |
3973 | 39 |
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
|
40 # 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
|
41 # 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
|
42 # that includes svgalib_helper.o: |
9881 | 43 ifneq ($(wildcard svgalib_helper),) |
44 CFLAGS += -DDEV_SVGA=\"/dev/svga\" -DCONFIG_SVGAHELPER -Isvgalib_helper/ | |
45 endif | |
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
|
46 |
3973 | 47 .SUFFIXES: .c .o |
48 | |
49 # .PHONY: all clean | |
50 | |
8506 | 51 .c.o: pci_names.c |
3973 | 52 $(CC) -c $(CFLAGS) -o $@ $< |
53 | |
54 $(LIBNAME): $(OBJS) | |
12069 | 55 ifeq ($(TARGET_WIN32),yes) |
11238 | 56 $(AR) r $(LIBNAME) $(OBJS) |
57 else | |
7812 | 58 #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS) |
59 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS) | |
3973 | 60 ln -sf $(LIBNAME) $(SHORTNAME) |
7824
ef5f2f54c231
really fix latest fix. But now this versioning stopped making sense to me.
eyck
parents:
7812
diff
changeset
|
61 ln -sf $(LIBNAME) $(VSHORTNAME) |
11238 | 62 endif |
3973 | 63 |
64 all: $(LIBNAME) $(SHORTNAME) | |
65 | |
4106 | 66 pci_names.c: |
12802
af5a4cc17170
Fix build on Turkish locales when LC_ALL is already set.
diego
parents:
12692
diff
changeset
|
67 LC_ALL=C $(AWK) -f pci_db2c.awk oth/pci.db |
4106 | 68 |
3973 | 69 test: |
70 $(CC) test.c -o test $(SHORTNAME) | |
71 | |
72 clean: | |
17488
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
73 rm -f *.o *.a *~ *.so *.so.* |
3973 | 74 |
17488
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
75 distclean: clean |
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
76 rm -f .depend test |
4106 | 77 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db |
3973 | 78 |
79 dep: depend | |
80 | |
8506 | 81 depend: pci_names.c |
3973 | 82 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend |
83 | |
84 install: | |
18083 | 85 -mkdir -p $(LIBDIR) |
17288 | 86 install -m 755 $(INSTALLSTRIP) -p $(LIBNAME) $(LIBDIR)/$(LIBNAME) |
14291 | 87 rm -f $(LIBDIR)/libdha.so |
88 ln -sf $(LIBNAME) $(LIBDIR)/$(SHORTNAME) | |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
89 ifeq ($(TARGET_OS),OpenBSD) |
17964
2a85c470cbd0
Discard return value from ldconfig, it might not work on non-root installs.
diego
parents:
17943
diff
changeset
|
90 -ldconfig -R |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
91 else |
17964
2a85c470cbd0
Discard return value from ldconfig, it might not work on non-root installs.
diego
parents:
17943
diff
changeset
|
92 -ldconfig |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
93 endif |
3973 | 94 |
8461 | 95 uninstall: |
14291 | 96 rm -f $(LIBDIR)/libdha.so $(LIBDIR)/$(SHORTNAME) $(LIBDIR)/$(LIBNAME) |
8461 | 97 ifeq ($(TARGET_OS),OpenBSD) |
17964
2a85c470cbd0
Discard return value from ldconfig, it might not work on non-root installs.
diego
parents:
17943
diff
changeset
|
98 -ldconfig -R |
8461 | 99 else |
17964
2a85c470cbd0
Discard return value from ldconfig, it might not work on non-root installs.
diego
parents:
17943
diff
changeset
|
100 -ldconfig |
8461 | 101 endif |
102 | |
3973 | 103 # |
104 # include dependency files if they exist | |
105 # | |
106 ifneq ($(wildcard .depend),) | |
107 include .depend | |
108 endif |