Mercurial > mplayer.hg
annotate libdha/Makefile @ 22576:8d6a555d6616
SHORTNAME is not a target so it should not be used as prerequisite.
author | diego |
---|---|
date | Thu, 15 Mar 2007 00:56:54 +0000 |
parents | ef8c42f9c638 |
children | a7af240446d3 |
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 |
22574 | 5 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION) |
3973 | 6 |
4167 | 7 ifeq ($(TARGET_OS),CYGWIN) |
8 SHORTNAME = libdha.dll | |
9 else | |
7811
aa0536d98278
change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents:
7073
diff
changeset
|
10 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
|
11 VSHORTNAME = libdha.so |
4167 | 12 endif |
12069 | 13 ifeq ($(TARGET_WIN32),yes) |
11238 | 14 LIBNAME = libdha.a |
15 SHORTNAME = libdha.a | |
16 else | |
7005
40c596e65526
adds a soname and a shared library version number to libdha.
arpi
parents:
6628
diff
changeset
|
17 LIBNAME = libdha.so.$(VERSION) |
11238 | 18 endif |
3973 | 19 |
22573 | 20 SRCS_MPLAYER = libdha.c \ |
22574 | 21 mtrr.c \ |
22 pci.c \ | |
23 pci_names.c \ | |
17943
c127ce678083
cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents:
17488
diff
changeset
|
24 |
22574 | 25 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o) |
3973 | 26 |
22574 | 27 CFLAGS = -fPIC -I. -I.. $(OPTFLAGS) |
20304 | 28 |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
29 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
|
30 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
|
31 LIBS += -li386 |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
32 endif |
6628
10131c2b3987
Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents:
6253
diff
changeset
|
33 endif |
3973 | 34 |
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
|
35 # 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
|
36 # 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
|
37 # that includes svgalib_helper.o: |
9881 | 38 ifneq ($(wildcard svgalib_helper),) |
39 CFLAGS += -DDEV_SVGA=\"/dev/svga\" -DCONFIG_SVGAHELPER -Isvgalib_helper/ | |
40 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
|
41 |
22576
8d6a555d6616
SHORTNAME is not a target so it should not be used as prerequisite.
diego
parents:
22575
diff
changeset
|
42 all: pci_names.c $(LIBNAME) |
3973 | 43 |
22573 | 44 $(LIBNAME): $(OBJS_MPLAYER) |
12069 | 45 ifeq ($(TARGET_WIN32),yes) |
22566 | 46 $(AR) r $@ $^ |
11238 | 47 else |
22566 | 48 $(CC) -shared -Wl,-soname -Wl,$@ -o $@ $^ $(LIBS) |
49 ln -sf $@ $(SHORTNAME) | |
50 ln -sf $@ $(VSHORTNAME) | |
11238 | 51 endif |
3973 | 52 |
21821 | 53 pci_names.c: oth/pci.db |
54 LC_ALL=C $(AWK) -f pci_db2c.awk $< | |
4106 | 55 |
22566 | 56 test: $(SHORTNAME) |
57 $(CC) test.c -o $@ $^ | |
3973 | 58 |
59 clean: | |
22575 | 60 rm -f *.o *.a *~ *.so *.so.* pci_*.c pci_*.h pci.db |
3973 | 61 |
17488
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
62 distclean: clean |
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
17288
diff
changeset
|
63 rm -f .depend test |
3973 | 64 |
21080 | 65 dep depend: pci_names.c |
22573 | 66 $(CC) -MM $(CFLAGS) $(SRCS_MPLAYER) 1>.depend |
3973 | 67 |
68 install: | |
18083 | 69 -mkdir -p $(LIBDIR) |
22570 | 70 $(INSTALL) -m 755 $(INSTALLSTRIP) -p $(LIBNAME) $(LIBDIR)/$(LIBNAME) |
14291 | 71 ln -sf $(LIBNAME) $(LIBDIR)/$(SHORTNAME) |
21955
c24e237516f6
Move ldconfig platform differences into configure where they belong.
diego
parents:
21850
diff
changeset
|
72 -$(LDCONFIG) |
3973 | 73 |
8461 | 74 uninstall: |
14291 | 75 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
|
76 -$(LDCONFIG) |
8461 | 77 |
22342 | 78 -include .depend |