Mercurial > mplayer.hg
annotate libdha/Makefile @ 22570:3ddc79315de0
Use the install program detected by configure.
author | diego |
---|---|
date | Wed, 14 Mar 2007 23:34:17 +0000 |
parents | 1882b3c86bd7 |
children | f02e65d6586f |
rev | line source |
---|---|
3973 | 1 include ../config.mak |
2 | |
12692
797e602bf1dd
make the awk script working for localized machines too, patch by Onur Kucuk
alex
parents:
12069
diff
changeset
|
3 MAJOR_VERSION = 1 |
797e602bf1dd
make the awk script working for localized machines too, patch by Onur Kucuk
alex
parents:
12069
diff
changeset
|
4 MINOR_VERSION = 0 |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
5 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION) |
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
6 |
3973 | 7 |
4167 | 8 ifeq ($(TARGET_OS),CYGWIN) |
9 SHORTNAME = libdha.dll | |
10 else | |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
11 SHORTNAME = libdha.so.$(MAJOR_VERSION) |
7824
ef5f2f54c231
really fix latest fix. But now this versioning stopped making sense to me.
eyck
parents:
7812
diff
changeset
|
12 VSHORTNAME = libdha.so |
4167 | 13 endif |
12069 | 14 ifeq ($(TARGET_WIN32),yes) |
11238 | 15 LIBNAME = libdha.a |
16 SHORTNAME = libdha.a | |
17 else | |
7005
40c596e65526
adds a soname and a shared library version number to libdha.
arpi
parents:
6628
diff
changeset
|
18 LIBNAME = libdha.so.$(VERSION) |
11238 | 19 endif |
3973 | 20 |
17943
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
21 SRCS=libdha.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
22 mtrr.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
23 pci.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
24 pci_names.c \ |
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
25 |
3973 | 26 OBJS=$(SRCS:.c=.o) |
27 | |
20388
9e8d9b93639c
Remove -fno-PIC check from configure and put -fPIC back at the beginning
diego
parents:
20307
diff
changeset
|
28 CFLAGS = -fPIC -I. -I.. $(OPTFLAGS) |
20304 | 29 |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
30 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
|
31 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
|
32 LIBS += -li386 |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
33 endif |
6628
10131c2b3987
Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents:
6253
diff
changeset
|
34 endif |
3973 | 35 |
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
|
36 # 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
|
37 # 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
|
38 # that includes svgalib_helper.o: |
9881 | 39 ifneq ($(wildcard svgalib_helper),) |
40 CFLAGS += -DDEV_SVGA=\"/dev/svga\" -DCONFIG_SVGAHELPER -Isvgalib_helper/ | |
41 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
|
42 |
8506 | 43 .c.o: pci_names.c |
3973 | 44 $(CC) -c $(CFLAGS) -o $@ $< |
45 | |
46 $(LIBNAME): $(OBJS) | |
12069 | 47 ifeq ($(TARGET_WIN32),yes) |
22566 | 48 $(AR) r $@ $^ |
11238 | 49 else |
22566 | 50 $(CC) -shared -Wl,-soname -Wl,$@ -o $@ $^ $(LIBS) |
51 ln -sf $@ $(SHORTNAME) | |
52 ln -sf $@ $(VSHORTNAME) | |
11238 | 53 endif |
3973 | 54 |
55 all: $(LIBNAME) $(SHORTNAME) | |
56 | |
21821 | 57 pci_names.c: oth/pci.db |
58 LC_ALL=C $(AWK) -f pci_db2c.awk $< | |
4106 | 59 |
22566 | 60 test: $(SHORTNAME) |
61 $(CC) test.c -o $@ $^ | |
3973 | 62 |
63 clean: | |
17488
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
64 rm -f *.o *.a *~ *.so *.so.* |
21850
a678ff4617fd
Remove generated pci_* files on clean, not just on distclean.
diego
parents:
21821
diff
changeset
|
65 rm -f pci_*.c pci_*.h pci.db |
3973 | 66 |
17488
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
67 distclean: clean |
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
68 rm -f .depend test |
3973 | 69 |
21080 | 70 dep depend: pci_names.c |
3973 | 71 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend |
72 | |
73 install: | |
18083 | 74 -mkdir -p $(LIBDIR) |
22570 | 75 $(INSTALL) -m 755 $(INSTALLSTRIP) -p $(LIBNAME) $(LIBDIR)/$(LIBNAME) |
14291 | 76 rm -f $(LIBDIR)/libdha.so |
77 ln -sf $(LIBNAME) $(LIBDIR)/$(SHORTNAME) | |
21955
c24e237516f6
Move ldconfig platform differences into configure where they belong.
diego
parents:
21850
diff
changeset
|
78 -$(LDCONFIG) |
3973 | 79 |
8461 | 80 uninstall: |
14291 | 81 rm -f $(LIBDIR)/libdha.so $(LIBDIR)/$(SHORTNAME) $(LIBDIR)/$(LIBNAME) |
21955
c24e237516f6
Move ldconfig platform differences into configure where they belong.
diego
parents:
21850
diff
changeset
|
82 -$(LDCONFIG) |
8461 | 83 |
22342 | 84 -include .depend |