ilo: add the driver to the build system
[mesa.git] / src / gallium / targets / dri-ilo / Makefile.am
1 # Copyright © 2012 Intel Corporation
2 # Copyright © 2013 LunarG, Inc.
3 #
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the "Software"),
6 # to deal in the Software without restriction, including without limitation
7 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 # and/or sell copies of the Software, and to permit persons to whom the
9 # Software is furnished to do so, subject to the following conditions:
10 #
11 # The above copyright notice and this permission notice (including the next
12 # paragraph) shall be included in all copies or substantial portions of the
13 # Software.
14 #
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 # DEALINGS IN THE SOFTWARE.
23
24 include $(top_srcdir)/src/gallium/Automake.inc
25
26 AM_CFLAGS = \
27 $(GALLIUM_CFLAGS) \
28 $(PTHREAD_CFLAGS) \
29 $(LIBDRM_CFLAGS)
30 AM_CPPFLAGS = \
31 -I$(top_srcdir)/src/gallium/drivers \
32 -I$(top_srcdir)/src/gallium/winsys \
33 -I$(top_srcdir)/src/mesa \
34 -I$(top_srcdir)/src/mapi \
35 -I$(top_builddir)/src/mesa/drivers/dri/common \
36 -DGALLIUM_RBUG \
37 -DGALLIUM_TRACE \
38 -DGALLIUM_GALAHAD
39
40 noinst_LTLIBRARIES = ilo_dri.la
41
42 ilo_dri_la_SOURCES = \
43 target.c \
44 $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
45 $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
46 $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
47
48 # need -rpath to create a noinst shared library
49 ilo_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined \
50 -rpath $(abs_builddir)
51
52 ilo_dri_la_LIBADD = \
53 $(top_builddir)/src/mesa/libmesagallium.la \
54 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
55 $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
56 $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
57 $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
58 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
59 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
60 $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
61 $(GALLIUM_DRI_LIB_DEPS) \
62 $(INTEL_LIBS)
63
64 # Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
65 nodist_EXTRA_ilo_dri_la_SOURCES = dummy-cpp.cpp
66
67 if HAVE_MESA_LLVM
68 ilo_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
69 ilo_dri_la_LIBADD += $(LLVM_LIBS)
70 endif
71
72 # Provide compatibility with scripts for the old Mesa build system for
73 # a while by putting a link to the driver into /lib of the build tree.
74 all-local: ilo_dri.la
75 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
76 ln -f .libs/ilo_dri.so $(top_builddir)/$(LIB_DIR)/gallium/ilo_dri.so
77 ln -sf ilo_dri.so $(top_builddir)/$(LIB_DIR)/gallium/i965_dri.so