blob: 2e46bde847dccc3a5c7db554f11f9b5d288acfeb [file] [log] [blame]
Adam Jackson07d23f92005-07-10 22:42:42 +00001# 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
Emil Velikov4255d3d2014-08-24 19:26:14 +010021include Makefile.sources
22
Javier Jardónfd3ed342011-02-09 13:28:20 +000023ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
Adam Jackson07d23f92005-07-10 22:42:42 +000024
Emil Velikov0dec5e12015-02-23 13:10:56 +000025AM_DISTCHECK_CONFIGURE_FLAGS = \
26 --enable-udev \
27 --enable-libkms \
28 --enable-intel \
29 --enable-radeon \
Emil Velikovbf482642015-08-07 16:19:49 +010030 --enable-amdgpu \
Emil Velikov0dec5e12015-02-23 13:10:56 +000031 --enable-nouveau \
Eric Anholt3c717f62016-01-25 10:16:56 -080032 --enable-vc4 \
Emil Velikov0dec5e12015-02-23 13:10:56 +000033 --enable-vmwgfx \
34 --enable-omap-experimental-api \
35 --enable-exynos-experimental-api \
36 --enable-freedreno \
37 --enable-freedreno-kgsl\
38 --enable-tegra-experimental-api \
The etnaviv authors95e2cc62016-09-06 18:15:53 +020039 --enable-etnaviv-experimental-api \
Emil Velikov0dec5e12015-02-23 13:10:56 +000040 --enable-install-test-programs \
41 --enable-cairo-tests \
Emil Velikov00808a92015-09-04 22:06:44 +010042 --enable-manpages \
43 --enable-valgrind
Emil Velikov0dec5e12015-02-23 13:10:56 +000044
Adam Jackson07d23f92005-07-10 22:42:42 +000045pkgconfigdir = @pkgconfigdir@
Julien Cristau89cc98c2009-10-31 02:25:44 +010046pkgconfig_DATA = libdrm.pc
Adam Jackson07d23f92005-07-10 22:42:42 +000047
Jakob Bornecrantz8c0571a2009-11-24 17:54:10 +010048if HAVE_LIBKMS
49LIBKMS_SUBDIR = libkms
50endif
51
Kristian Høgsberg4f57abf2009-11-17 11:14:54 -050052if HAVE_INTEL
53INTEL_SUBDIR = intel
54endif
55
56if HAVE_NOUVEAU
57NOUVEAU_SUBDIR = nouveau
58endif
59
60if HAVE_RADEON
61RADEON_SUBDIR = radeon
62endif
63
Alex Deucher09361392015-04-20 12:04:22 -040064if HAVE_AMDGPU
65AMDGPU_SUBDIR = amdgpu
66endif
67
Rob Clarkef1b9582012-03-28 14:39:43 -050068if HAVE_OMAP
69OMAP_SUBDIR = omap
70endif
71
Inki Daee07b6502012-05-04 19:13:14 +090072if HAVE_EXYNOS
73EXYNOS_SUBDIR = exynos
74endif
75
Rob Clark41fc2cc2012-10-07 18:57:31 -050076if HAVE_FREEDRENO
77FREEDRENO_SUBDIR = freedreno
78endif
79
Thierry Redingd6a4c2c2012-12-01 10:30:38 +010080if HAVE_TEGRA
81TEGRA_SUBDIR = tegra
82endif
83
Eric Anholt3c717f62016-01-25 10:16:56 -080084if HAVE_VC4
85VC4_SUBDIR = vc4
86endif
87
The etnaviv authors95e2cc62016-09-06 18:15:53 +020088if HAVE_ETNAVIV
89ETNAVIV_SUBDIR = etnaviv
90endif
91
Emil Velikove2b53182015-04-06 19:02:38 +010092if BUILD_MANPAGES
93if HAVE_MANPAGES_STYLESHEET
94MAN_SUBDIR = man
95endif
96endif
97
Emil Velikov9f90ee92014-12-02 00:10:38 +000098SUBDIRS = \
99 . \
100 $(LIBKMS_SUBDIR) \
101 $(INTEL_SUBDIR) \
102 $(NOUVEAU_SUBDIR) \
103 $(RADEON_SUBDIR) \
Alex Deucher09361392015-04-20 12:04:22 -0400104 $(AMDGPU_SUBDIR) \
Emil Velikov9f90ee92014-12-02 00:10:38 +0000105 $(OMAP_SUBDIR) \
106 $(EXYNOS_SUBDIR) \
107 $(FREEDRENO_SUBDIR) \
108 $(TEGRA_SUBDIR) \
Eric Anholt3c717f62016-01-25 10:16:56 -0800109 $(VC4_SUBDIR) \
The etnaviv authors95e2cc62016-09-06 18:15:53 +0200110 $(ETNAVIV_SUBDIR) \
Emil Velikov9f90ee92014-12-02 00:10:38 +0000111 tests \
Emil Velikove2b53182015-04-06 19:02:38 +0100112 $(MAN_SUBDIR)
Kristian Høgsberg4f57abf2009-11-17 11:14:54 -0500113
114libdrm_la_LTLIBRARIES = libdrm.la
115libdrm_ladir = $(libdir)
Emil Velikov1e66ee22015-08-24 18:21:51 +0100116libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined
117libdrm_la_LIBADD = @CLOCK_LIB@ -lm
Kristian Høgsberg4f57abf2009-11-17 11:14:54 -0500118
119libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
Eric Anholt734de702013-12-28 22:06:51 -0800120AM_CFLAGS = \
Emil Velikov4c6b1b12015-02-23 12:52:47 +0000121 $(WARN_CFLAGS) \
Emil Velikov5b0e76f2015-05-30 14:25:08 +0100122 $(VALGRIND_CFLAGS)
Kristian Høgsberg4f57abf2009-11-17 11:14:54 -0500123
Emil Velikov4255d3d2014-08-24 19:26:14 +0100124libdrm_la_SOURCES = $(LIBDRM_FILES)
Kristian Høgsberg4f57abf2009-11-17 11:14:54 -0500125
126libdrmincludedir = ${includedir}
Emil Velikov4255d3d2014-08-24 19:26:14 +0100127libdrminclude_HEADERS = $(LIBDRM_H_FILES)
Kristian Høgsberg4f57abf2009-11-17 11:14:54 -0500128
Emil Velikov98ec08d2014-09-07 15:31:00 +0100129klibdrmincludedir = ${includedir}/libdrm
130klibdrminclude_HEADERS = $(LIBDRM_INCLUDE_H_FILES)
131
132if HAVE_VMWGFX
133klibdrminclude_HEADERS += $(LIBDRM_INCLUDE_VMWGFX_H_FILES)
134endif
135
Emil Velikovde13ea32016-11-14 17:59:28 +0000136EXTRA_DIST = include/drm/README
Emil Velikov98ec08d2014-09-07 15:31:00 +0100137
Kristian Høgsberga9968032009-11-17 09:23:52 -0500138copy-headers :
Emil Velikovf52309e2014-09-07 15:54:16 +0100139 cp -r $(kernel_source)/include/uapi/drm/*.h $(top_srcdir)/include/drm/
Kristian Høgsberga9968032009-11-17 09:23:52 -0500140
141commit-headers : copy-headers
Emil Velikovf52309e2014-09-07 15:54:16 +0100142 git add include/drm/*.h
Kristian Høgsberga9968032009-11-17 09:23:52 -0500143 git commit -am "Copy headers from kernel $$(GIT_DIR=$(kernel_source)/.git git describe)"