annotate libdha/Makefile @ 22567:d68e5e8609a7

Remove commented out superfluous lines.
author diego
date Wed, 14 Mar 2007 22:40:10 +0000
parents 206456738325
children ad8f3d791bca
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 include ../config.mak
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
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
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
7
4167
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
8 ifeq ($(TARGET_OS),CYGWIN)
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
9 SHORTNAME = libdha.dll
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
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)
aa0536d98278 change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
eyck
parents: 7073
diff changeset
12 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
13 VSHORTNAME = libdha.so
4167
36fb2dcd3ccc Fix for cygwin.
atmos4
parents: 4110
diff changeset
14 endif
12069
841fd0c2f2e3 fix compilation on cygwin
faust3
parents: 11238
diff changeset
15 ifeq ($(TARGET_WIN32),yes)
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
16 LIBNAME = libdha.a
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
17 SHORTNAME = libdha.a
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
18 else
7005
40c596e65526 adds a soname and a shared library version number to libdha.
arpi
parents: 6628
diff changeset
19 LIBNAME = libdha.so.$(VERSION)
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
20 endif
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
21
17943
c127ce678083 cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents: 17488
diff changeset
22 SRCS=libdha.c \
c127ce678083 cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents: 17488
diff changeset
23 mtrr.c \
c127ce678083 cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents: 17488
diff changeset
24 pci.c \
c127ce678083 cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents: 17488
diff changeset
25 pci_names.c \
c127ce678083 cosmetics: Shorten overly long lines, put SRCS/OBJS on individual lines
diego
parents: 17488
diff changeset
26
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
27 OBJS=$(SRCS:.c=.o)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
28
20388
9e8d9b93639c Remove -fno-PIC check from configure and put -fPIC back at the beginning
diego
parents: 20307
diff changeset
29 CFLAGS = -fPIC -I. -I.. $(OPTFLAGS)
20304
c9c6db3c2645 Remove stray line.
diego
parents: 19420
diff changeset
30
6057
31e465fda59c various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 4476
diff changeset
31 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
32 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
33 LIBS += -li386
31e465fda59c various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 4476
diff changeset
34 endif
6628
10131c2b3987 Small fix for non-X86 OpenBSD by Bj«Órn Sandell <biorn at dce.chalmers.se>
atmos4
parents: 6253
diff changeset
35 endif
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
36
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
37 # 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
38 # 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
39 # that includes svgalib_helper.o:
9881
60d1ccf22469 automatic svgalib_helper detection
alex
parents: 8506
diff changeset
40 ifneq ($(wildcard svgalib_helper),)
60d1ccf22469 automatic svgalib_helper detection
alex
parents: 8506
diff changeset
41 CFLAGS += -DDEV_SVGA=\"/dev/svga\" -DCONFIG_SVGAHELPER -Isvgalib_helper/
60d1ccf22469 automatic svgalib_helper detection
alex
parents: 8506
diff changeset
42 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
43
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
44 .SUFFIXES: .c .o
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
45
8506
55e80f13c826 pci_names.c creation fixup
alex
parents: 8503
diff changeset
46 .c.o: pci_names.c
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
47 $(CC) -c $(CFLAGS) -o $@ $<
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
48
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
49 $(LIBNAME): $(OBJS)
12069
841fd0c2f2e3 fix compilation on cygwin
faust3
parents: 11238
diff changeset
50 ifeq ($(TARGET_WIN32),yes)
22566
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
51 $(AR) r $@ $^
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
52 else
22566
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
53 #$(CC) -shared $(SONAME_FLAGS) -o $@ $^ $(LIBS)
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
54 $(CC) -shared -Wl,-soname -Wl,$@ -o $@ $^ $(LIBS)
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
55 ln -sf $@ $(SHORTNAME)
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
56 ln -sf $@ $(VSHORTNAME)
11238
38ce28265e5f imho static linking causes less problems for mingw
faust3
parents: 9881
diff changeset
57 endif
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
58
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
59 all: $(LIBNAME) $(SHORTNAME)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
60
21821
2a0a1f974172 Fix dependencies for pci_names.c.
diego
parents: 21230
diff changeset
61 pci_names.c: oth/pci.db
2a0a1f974172 Fix dependencies for pci_names.c.
diego
parents: 21230
diff changeset
62 LC_ALL=C $(AWK) -f pci_db2c.awk $<
4106
64c1e79575df Gawk generator
nick
parents: 4030
diff changeset
63
22566
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
64 test: $(SHORTNAME)
206456738325 Simplify rules using make shorthands.
diego
parents: 22342
diff changeset
65 $(CC) test.c -o $@ $^
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
66
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
67 clean:
17488
ce1ba8fd57e7 Make clean/distclean behave uniformly in all directories.
diego
parents: 17288
diff changeset
68 rm -f *.o *.a *~ *.so *.so.*
21850
a678ff4617fd Remove generated pci_* files on clean, not just on distclean.
diego
parents: 21821
diff changeset
69 rm -f pci_*.c pci_*.h pci.db
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
70
17488
ce1ba8fd57e7 Make clean/distclean behave uniformly in all directories.
diego
parents: 17288
diff changeset
71 distclean: clean
ce1ba8fd57e7 Make clean/distclean behave uniformly in all directories.
diego
parents: 17288
diff changeset
72 rm -f .depend test
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
73
21080
618d1857f4c4 Unify dep/depend targets.
diego
parents: 20388
diff changeset
74 dep depend: pci_names.c
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
75 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
76
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
77 install:
18083
b069afd2a0de Simplify mkdir calls.
diego
parents: 17964
diff changeset
78 -mkdir -p $(LIBDIR)
17288
4c86d2479aa2 use $(INSTALLSTRIP) consistently
rathann
parents: 14291
diff changeset
79 install -m 755 $(INSTALLSTRIP) -p $(LIBNAME) $(LIBDIR)/$(LIBNAME)
14291
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
80 rm -f $(LIBDIR)/libdha.so
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
81 ln -sf $(LIBNAME) $(LIBDIR)/$(SHORTNAME)
21955
c24e237516f6 Move ldconfig platform differences into configure where they belong.
diego
parents: 21850
diff changeset
82 -$(LDCONFIG)
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
83
8461
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
84 uninstall:
14291
f4b8d6abce22 Install libdha into LIBDIR.
reimar
parents: 12802
diff changeset
85 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
86 -$(LDCONFIG)
8461
ace211f1ed2b uninstall switch
alex
parents: 7824
diff changeset
87
22342
909e1e707dc5 Simplify .depend file inclusion.
diego
parents: 21955
diff changeset
88 -include .depend