8bf2a12e806cb53235dbd5907baa55e5ca9c88df
[mesa.git] / src / gallium / Automake.inc
1 GALLIUM_CFLAGS = \
2 -I$(top_srcdir)/include \
3 -I$(top_srcdir)/src/gallium/include \
4 -I$(top_srcdir)/src/gallium/auxiliary \
5 $(DEFINES)
6
7 # src/gallium/auxiliary must appear before src/gallium/drivers
8 # because there are stupidly two rbug_context.h files in
9 # different directories, and which one is included by the
10 # preprocessor is determined by the ordering of the -I flags.
11 GALLIUM_DRIVER_CFLAGS = \
12 -I$(srcdir)/include \
13 -I$(top_srcdir)/include \
14 -I$(top_srcdir)/src/gallium/include \
15 -I$(top_srcdir)/src/gallium/auxiliary \
16 -I$(top_srcdir)/src/gallium/drivers \
17 $(DEFINES) \
18 $(VISIBILITY_CFLAGS)
19
20 GALLIUM_DRIVER_CXXFLAGS = \
21 -I$(srcdir)/include \
22 -I$(top_srcdir)/include \
23 -I$(top_srcdir)/src/gallium/include \
24 -I$(top_srcdir)/src/gallium/auxiliary \
25 -I$(top_srcdir)/src/gallium/drivers \
26 $(DEFINES) \
27 $(VISIBILITY_CXXFLAGS)
28
29 GALLIUM_DRI_CFLAGS = \
30 -I$(top_srcdir)/include \
31 -I$(top_srcdir)/src/gallium/include \
32 -I$(top_srcdir)/src/gallium/auxiliary \
33 -I$(top_srcdir)/src/gallium/drivers \
34 -I$(top_srcdir)/src/gallium/winsys \
35 -I$(top_srcdir)/src/mesa \
36 -I$(top_srcdir)/src/mapi \
37 $(DEFINES) \
38 $(PTHREAD_CFLAGS) \
39 $(LIBDRM_CFLAGS) \
40 $(VISIBILITY_CFLAGS)
41
42 GALLIUM_VIDEO_CFLAGS = \
43 -I$(top_srcdir)/include \
44 -I$(top_srcdir)/src/loader \
45 -I$(top_srcdir)/src/gallium/include \
46 -I$(top_srcdir)/src/gallium/auxiliary \
47 -I$(top_srcdir)/src/gallium/drivers \
48 -I$(top_srcdir)/src/gallium/winsys \
49 $(DEFINES) \
50 $(PTHREAD_CFLAGS) \
51 $(LIBDRM_CFLAGS) \
52 $(VISIBILITY_CFLAGS)
53
54
55 GALLIUM_DRI_LINKER_FLAGS = \
56 -shared \
57 -shrext .so \
58 -module \
59 -avoid-version \
60 $(GC_SECTIONS)
61
62 GALLIUM_OMX_LINKER_FLAGS = \
63 -shared \
64 -module \
65 -no-undefined \
66 -avoid-version \
67 $(GC_SECTIONS) \
68 $(LD_NO_UNDEFINED)
69
70 if HAVE_LD_VERSION_SCRIPT
71 GALLIUM_DRI_LINKER_FLAGS += \
72 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri.sym
73
74 GALLIUM_OMX_LINKER_FLAGS += \
75 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym
76 endif
77
78
79 GALLIUM_COMMON_LIB_DEPS = \
80 -lm \
81 $(CLOCK_LIB) \
82 $(PTHREAD_LIBS) \
83 $(DLOPEN_LIBS)
84
85 GALLIUM_DRI_LIB_DEPS = \
86 $(top_builddir)/src/mesa/libmesagallium.la \
87 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
88 $(SELINUX_LIBS) \
89 $(LIBDRM_LIBS) \
90 $(EXPAT_LIBS) \
91 $(GALLIUM_COMMON_LIB_DEPS)
92
93 GALLIUM_OMX_LIB_DEPS = \
94 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
95 $(top_builddir)/src/gallium/state_trackers/omx/libomxtracker.la \
96 $(OMX_LIBS) \
97 $(GALLIUM_COMMON_LIB_DEPS)
98
99 GALLIUM_WINSYS_CFLAGS = \
100 -I$(top_srcdir)/include \
101 -I$(top_srcdir)/src/gallium/include \
102 -I$(top_srcdir)/src/gallium/auxiliary \
103 $(DEFINES) \
104 $(VISIBILITY_CFLAGS)
105
106 if HAVE_MESA_LLVM
107
108 GALLIUM_DRI_LINKER_FLAGS += $(LLVM_LDFLAGS)
109 GALLIUM_OMX_LINKER_FLAGS += $(LLVM_LDFLAGS)
110
111 GALLIUM_DRI_LIB_DEPS += $(LLVM_LIBS)
112 GALLIUM_OMX_LIB_DEPS += $(LLVM_LIBS)
113
114 endif
115
116
117 GALLIUM_PIPE_LOADER_WINSYS_LIBS = \
118 $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
119
120 if HAVE_DRISW
121 GALLIUM_PIPE_LOADER_WINSYS_LIBS += \
122 $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
123 endif
124
125 if NEED_WINSYS_XLIB
126 GALLIUM_PIPE_LOADER_WINSYS_LIBS += \
127 $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
128 -lX11 -lXext -lXfixes \
129 $(LIBDRM_LIBS)
130 endif