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 21SUBDIRS = brw fb 22 23AM_CFLAGS = \ 24 @CWARNFLAGS@ \ 25 -I$(top_srcdir)/src \ 26 -I$(top_srcdir)/src/render_program \ 27 $(XORG_CFLAGS) \ 28 $(UDEV_CFLAGS) \ 29 $(DRM_CFLAGS) \ 30 $(NULL) 31 32if VALGRIND 33AM_CFLAGS += $(VALGRIND_CFLAGS) 34endif 35 36noinst_LTLIBRARIES = libsna.la 37libsna_la_LDFLAGS = -pthread 38libsna_la_LIBADD = $(UDEV_LIBS) -lm $(DRM_LIBS) brw/libbrw.la fb/libfb.la ../../libobj/libcompat.la 39 40libsna_la_SOURCES = \ 41 atomic.h \ 42 blt.c \ 43 compiler.h \ 44 debug.h \ 45 kgem.c \ 46 kgem.h \ 47 rop.h \ 48 sna.h \ 49 sna_accel.c \ 50 sna_acpi.c \ 51 sna_blt.c \ 52 sna_composite.c \ 53 sna_cpu.c \ 54 sna_cpuid.h \ 55 sna_damage.c \ 56 sna_damage.h \ 57 sna_display.c \ 58 sna_display_fake.c \ 59 sna_driver.c \ 60 sna_glyphs.c \ 61 sna_gradient.c \ 62 sna_io.c \ 63 sna_module.h \ 64 sna_render.c \ 65 sna_render.h \ 66 sna_render_inline.h \ 67 sna_reg.h \ 68 sna_stream.c \ 69 sna_trapezoids.h \ 70 sna_trapezoids.c \ 71 sna_trapezoids_boxes.c \ 72 sna_trapezoids_imprecise.c \ 73 sna_trapezoids_mono.c \ 74 sna_trapezoids_precise.c \ 75 sna_tiling.c \ 76 sna_transform.c \ 77 sna_threads.c \ 78 sna_vertex.c \ 79 sna_video.c \ 80 sna_video.h \ 81 sna_video_overlay.c \ 82 sna_video_sprite.c \ 83 sna_video_textured.c \ 84 gen2_render.c \ 85 gen2_render.h \ 86 gen3_render.c \ 87 gen3_render.h \ 88 gen4_common.c \ 89 gen4_common.h \ 90 gen4_render.c \ 91 gen4_render.h \ 92 gen4_source.c \ 93 gen4_source.h \ 94 gen4_vertex.c \ 95 gen4_vertex.h \ 96 gen5_render.c \ 97 gen5_render.h \ 98 gen6_common.c \ 99 gen6_common.h \ 100 gen6_render.c \ 101 gen6_render.h \ 102 gen7_render.c \ 103 gen7_render.h \ 104 gen8_eu.c \ 105 gen8_eu.h \ 106 gen8_render.c \ 107 gen8_render.h \ 108 gen8_vertex.c \ 109 gen8_vertex.h \ 110 gen9_render.c \ 111 gen9_render.h \ 112 xassert.h \ 113 $(NULL) 114 115if DRI2 116AM_CFLAGS += $(DRI2_CFLAGS) 117libsna_la_SOURCES += sna_dri2.c 118libsna_la_LIBADD += $(DRI2_LIBS) @CLOCK_GETTIME_LIBS@ 119endif 120 121if DRI3 122AM_CFLAGS += $(DRI3_CFLAGS) 123libsna_la_SOURCES += sna_dri3.c 124libsna_la_LIBADD += $(DRI3_LIBS) 125endif 126 127if PRESENT 128AM_CFLAGS += $(PRESENT_CFLAGS) 129libsna_la_SOURCES += sna_present.c 130libsna_la_LIBADD += $(PRESENT_LIBS) 131endif 132 133if XVMC 134libsna_la_SOURCES += \ 135 sna_video_hwmc.h \ 136 sna_video_hwmc.c \ 137 $(NULL) 138endif 139 140if FULL_DEBUG 141libsna_la_SOURCES += \ 142 kgem_debug.c \ 143 kgem_debug.h \ 144 kgem_debug_gen2.c \ 145 kgem_debug_gen3.c \ 146 kgem_debug_gen4.c \ 147 kgem_debug_gen5.c \ 148 kgem_debug_gen6.c \ 149 kgem_debug_gen7.c \ 150 $(NULL) 151endif 152 153if HAVE_DOT_GIT 154git_version.h: $(top_srcdir)/.git/HEAD $(shell sed -e '/ref:/!d' -e 's#ref: *#$(top_srcdir)/.git/#' < $(top_srcdir)/.git/HEAD) 155 @echo "Recording git-tree used for compilation: `git describe`" 156 @V=`git describe`; echo "static const char git_version[] = \"$$V\";" > git_version.h 157sna_driver.c: git_version.h 158endif 159 160AM_CFLAGS += @NOWARNFLAGS@ 161