annotate libdha/Makefile @ 17448:54ca4b4f9695

1.1207: MPLAYER_VERBOSE, new enviorment variable to control verbosity before init
author kraymer
date Sat, 21 Jan 2006 10:42:39 +0000
parents 4c86d2479aa2
children ce1ba8fd57e7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
1 # makefile
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
2
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
3 include ../config.mak
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
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
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
9
4167
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
10 ifeq ($(TARGET_OS),CYGWIN)
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
11 SHORTNAME = libdha.dll
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
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
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
17 endif
12069
841fd0c2f2e3 fix compilation on cygwin
faust3
parents: 11238
diff changeset
18 ifeq ($(TARGET_WIN32),yes)
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
19 LIBNAME = libdha.a
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
20 SHORTNAME = libdha.a
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
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
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
23 endif
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
24
4476
0d9a096cfd46 MTRR configuring
nick
parents: 4215
diff changeset
25 SRCS=libdha.c mtrr.c pci.c pci_names.c
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
26 OBJS=$(SRCS:.c=.o)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
27
7073
b69ddd4d3bb9 removed -W -Wall -g and other gcc-specific warning/debug options
arpi
parents: 7005
diff changeset
28 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
29 LIBS =
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
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
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
60d1ccf22469 automatic svgalib_helper detection
alex
parents: 8506
diff changeset
39 ifneq ($(wildcard svgalib_helper),)
60d1ccf22469 automatic svgalib_helper detection
alex
parents: 8506
diff changeset
40 CFLAGS += -DDEV_SVGA=\"/dev/svga\" -DCONFIG_SVGAHELPER -Isvgalib_helper/
60d1ccf22469 automatic svgalib_helper detection
alex
parents: 8506
diff changeset
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
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
43 .SUFFIXES: .c .o
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
44
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
45 # .PHONY: all clean
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
46
8506
55e80f13c826 pci_names.c creation fixup
alex
parents: 8503
diff changeset
47 .c.o: pci_names.c
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
48 $(CC) -c $(CFLAGS) -o $@ $<
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
49
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
50 $(LIBNAME): $(OBJS)
12069
841fd0c2f2e3 fix compilation on cygwin
faust3
parents: 11238
diff changeset
51 ifeq ($(TARGET_WIN32),yes)
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
52 $(AR) r $(LIBNAME) $(OBJS)
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
53 else
7812
29a006405a5f fix previous patch.
eyck
parents: 7811
diff changeset
54 #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS)
29a006405a5f fix previous patch.
eyck
parents: 7811
diff changeset
55 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS)
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
56 ln -sf $(LIBNAME) $(SHORTNAME)
7824
ef5f2f54c231 really fix latest fix. But now this versioning stopped making sense to me.
eyck
parents: 7812
diff changeset
57 ln -sf $(LIBNAME) $(VSHORTNAME)
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
58 endif
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
59
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
60 all: $(LIBNAME) $(SHORTNAME)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
61
4106
64c1e79575df Gawk generator
nick
parents: 4030
diff changeset
62 pci_names.c:
12802
af5a4cc17170 Fix build on Turkish locales when LC_ALL is already set.
diego
parents: 12692
diff changeset
63 LC_ALL=C $(AWK) -f pci_db2c.awk oth/pci.db
4106
64c1e79575df Gawk generator
nick
parents: 4030
diff changeset
64
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
65 test:
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
66 $(CC) test.c -o test $(SHORTNAME)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
67
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
68 clean:
7811
aa0536d98278 change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents: 7073
diff changeset
69 rm -f *.o *.so *.so.* *~
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
70
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
71 distclean:
7811
aa0536d98278 change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents: 7073
diff changeset
72 rm -f Makefile.bak *.o *.so *.so.* test *~ .depend
4106
64c1e79575df Gawk generator
nick
parents: 4030
diff changeset
73 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
74
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
75 dep: depend
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
76
8506
55e80f13c826 pci_names.c creation fixup
alex
parents: 8503
diff changeset
77 depend: pci_names.c
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
78 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
79
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
80 install:
14291
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
81 mkdir -p $(LIBDIR)
17288
4c86d2479aa2 use $(INSTALLSTRIP) consistently
rathann
parents: 14291
diff changeset
82 install -m 755 $(INSTALLSTRIP) -p $(LIBNAME) $(LIBDIR)/$(LIBNAME)
14291
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
83 rm -f $(LIBDIR)/libdha.so
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
84 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
85 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
86 ldconfig -R
31e465fda59c various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 4476
diff changeset
87 else
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
88 ldconfig
6057
31e465fda59c various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 4476
diff changeset
89 endif
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
90
8461
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
91 uninstall:
14291
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
92 rm -f $(LIBDIR)/libdha.so $(LIBDIR)/$(SHORTNAME) $(LIBDIR)/$(LIBNAME)
8461
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
93 ifeq ($(TARGET_OS),OpenBSD)
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
94 ldconfig -R
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
95 else
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
96 ldconfig
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
97 endif
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
98
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
99 #
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
100 # include dependency files if they exist
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
101 #
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
102 ifneq ($(wildcard .depend),)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
103 include .depend
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
104 endif