aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am30
-rw-r--r--README4
-rw-r--r--configure.ac46
-rw-r--r--libdrm.pc.in8
-rw-r--r--libdrm/Makefile55
-rw-r--r--libdrm/Makefile.am58
6 files changed, 146 insertions, 55 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..6cbd52a9
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,30 @@
1# Copyright 2005 Adam Jackson.
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# on the rights to use, copy, modify, merge, publish, distribute, sub
7# license, and/or sell copies of the Software, and to permit persons to whom
8# the Software is furnished to do so, subject to the following conditions:
9#
10# The above copyright notice and this permission notice (including the next
11# paragraph) shall be included in all copies or substantial portions of the
12# Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21# eventually someone might want to build the kernel modules or tests from
22# here too, but let's just do libdrm for now
23
24AUTOMAKE_OPTIONS = foreign
25SUBDIRS = libdrm
26
27pkgconfigdir = @pkgconfigdir@
28pkgconfig_DATA = libdrm.pc
29
30EXTRA_DIST = libdrm.pc.in
diff --git a/README b/README
new file mode 100644
index 00000000..c94dce5f
--- /dev/null
+++ b/README
@@ -0,0 +1,4 @@
1By default, this will install into /usr/local. If you want to install this
2libdrm to replace your system copy, say:
3
4./autogen.sh --enable-system
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..4fb505df
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,46 @@
1# Copyright 2005 Adam Jackson.
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# on the rights to use, copy, modify, merge, publish, distribute, sub
7# license, and/or sell copies of the Software, and to permit persons to whom
8# the Software is furnished to do so, subject to the following conditions:
9#
10# The above copyright notice and this permission notice (including the next
11# paragraph) shall be included in all copies or substantial portions of the
12# Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21AC_PREREQ(2.57)
22AC_INIT([libdrm], 1.0.0, [dri-devel@lists.sourceforge.net], libdrm)
23AC_CONFIG_SRCDIR([Makefile.am])
24AM_INIT_AUTOMAKE([dist-bzip2])
25
26AM_CONFIG_HEADER([libdrm/config.h])
27
28AC_PROG_LIBTOOL
29AC_PROG_CC
30
31AC_HEADER_STDC
32
33AC_ARG_ENABLE(system, AC_HELP_STRING([--enable-system],
34 [Configure to be the system libdrm]),
35 [SYSTEM=$enableval], [SYSTEM=no])
36AM_CONDITIONAL(SYSTEM, [test x$SYSTEM = xyes])
37if test x$SYSTEM = xyes; then
38 libdir=/lib
39 includedir=/usr/include
40 pkgconfigdir=/usr/lib/pkgconfig
41else
42 pkgconfigdir=${libdir}/pkgconfig
43fi
44AC_SUBST(pkgconfigdir)
45
46AC_OUTPUT([Makefile libdrm/Makefile libdrm.pc])
diff --git a/libdrm.pc.in b/libdrm.pc.in
new file mode 100644
index 00000000..f8764c46
--- /dev/null
+++ b/libdrm.pc.in
@@ -0,0 +1,8 @@
1libdir=@libdir@
2includedir=@includedir@
3
4Name: libdrm
5Description: Userspace interface to kernel DRM services
6Version: @PACKAGE_VERSION@
7Libs: -L${libdir}
8Cflags: -I${includedir} -I${includedir}/drm
diff --git a/libdrm/Makefile b/libdrm/Makefile
deleted file mode 100644
index 098f31a1..00000000
--- a/libdrm/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
1SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c
2OBJECTS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o
3
4CFLAGS ?= -O2 -fPIC -g
5DEFINES = -D_IN_LIBDRM
6
7# set this if you're installing into a fake root
8DESTDIR ?=
9
10DRIVER_HEADERS = ../shared-core/drm.h \
11 ../shared-core/drm_sarea.h \
12 ../shared-core/i915_drm.h \
13 ../shared-core/i915_drv.h \
14 ../shared-core/mach64_drm.h \
15 ../shared-core/mach64_drv.h \
16 ../shared-core/mga_drm.h \
17 ../shared-core/mga_drv.h \
18 ../shared-core/mga_ucode.h \
19 ../shared-core/r128_drm.h \
20 ../shared-core/r128_drv.h \
21 ../shared-core/radeon_drm.h \
22 ../shared-core/radeon_drv.h \
23 ../shared-core/savage_drm.h \
24 ../shared-core/savage_drv.h \
25 ../shared-core/sis_drm.h \
26 ../shared-core/sis_drv.h \
27 ../shared-core/sis_ds.h \
28 ../shared-core/tdfx_drv.h \
29 ../shared-core/via_3d_reg.h \
30 ../shared-core/via_drm.h \
31 ../shared-core/via_drv.h \
32 ../shared-core/via_ds.h \
33 ../shared-core/via_mm.h \
34 ../shared-core/via_verifier.h
35
36all: libdrm.so
37
38libdrm.so: $(OBJECTS)
39 $(CC) -shared -Wl,-hlibdrm.so.1 -o $@ $^
40
41.c.o:
42 $(CC) $(DEFINES) $(CFLAGS) -c -I../shared-core $<
43
44clean:
45 rm -f *.a *.o *.so
46
47# XXX remove the xf86drm.h compat once this is widely installed
48install: libdrm.so xf86drm.h $(DRIVER_HEADERS)
49 install -m 755 libdrm.so $(DESTDIR)/lib
50 install -m 644 xf86drm.h $(DESTDIR)/usr/include/libdrm.h
51 install -m 644 xf86drm.h $(DESTDIR)/usr/include/xf86drm.h
52 echo '#warning Including xf86drm.h is deprecated, use libdrm.h' >> \
53 $(DESTDIR)/usr/include/xf86drm.h
54 mkdir -p -m 755 $(DESTDIR)/usr/include/drm
55 install -m 644 $(DRIVER_HEADERS) $(DESTDIR)/usr/include/drm
diff --git a/libdrm/Makefile.am b/libdrm/Makefile.am
new file mode 100644
index 00000000..f5fa69b2
--- /dev/null
+++ b/libdrm/Makefile.am
@@ -0,0 +1,58 @@
1# Copyright 2005 Adam Jackson.
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# on the rights to use, copy, modify, merge, publish, distribute, sub
7# license, and/or sell copies of the Software, and to permit persons to whom
8# the Software is furnished to do so, subject to the following conditions:
9#
10# The above copyright notice and this permission notice (including the next
11# paragraph) shall be included in all copies or substantial portions of the
12# Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21libdrm_la_LTLIBRARIES = libdrm.la
22libdrm_ladir = /lib
23libdrm_la_LDFLAGS = -version-number 1:0:0 -no-undefined
24
25AM_CFLAGS = -I$(top_srcdir)/shared-core
26libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c
27
28libdrmincludedir = ${includedir}
29libdrminclude_HEADERS = xf86drm.h
30
31klibdrmincludedir = ${includedir}/drm
32klibdrminclude_HEADERS = \
33 ../shared-core/drm.h \
34 ../shared-core/drm_sarea.h \
35 ../shared-core/i915_drm.h \
36 ../shared-core/i915_drv.h \
37 ../shared-core/imagine_drv.h \
38 ../shared-core/mach64_drm.h \
39 ../shared-core/mach64_drv.h \
40 ../shared-core/mga_drm.h \
41 ../shared-core/mga_drv.h \
42 ../shared-core/mga_ucode.h \
43 ../shared-core/r128_drm.h \
44 ../shared-core/r128_drv.h \
45 ../shared-core/radeon_drm.h \
46 ../shared-core/radeon_drv.h \
47 ../shared-core/savage_drm.h \
48 ../shared-core/savage_drv.h \
49 ../shared-core/sis_drm.h \
50 ../shared-core/sis_drv.h \
51 ../shared-core/sis_ds.h \
52 ../shared-core/tdfx_drv.h \
53 ../shared-core/via_3d_reg.h \
54 ../shared-core/via_drm.h \
55 ../shared-core/via_drv.h \
56 ../shared-core/via_ds.h \
57 ../shared-core/via_mm.h \
58 ../shared-core/via_verifier.h