gallium/targets: move LLVM_LIBS handling inside Automake.inc
[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/gallium/include \
45 -I$(top_srcdir)/src/gallium/auxiliary \
46 -I$(top_srcdir)/src/gallium/drivers \
47 -I$(top_srcdir)/src/gallium/winsys \
48 $(DEFINES) \
49 $(PTHREAD_CFLAGS) \
50 $(LIBDRM_CFLAGS) \
51 $(VISIBILITY_CFLAGS)
52
53
54 DRI_VERSION_SCRIPT ?= $(top_srcdir)/src/gallium/state_trackers/dri/dri.link
55
56 GALLIUM_DRI_LINKER_FLAGS = \
57 -module \
58 -avoid-version \
59 -Wl,--version-script=$(DRI_VERSION_SCRIPT) \
60 -shared \
61 -no-undefined
62
63 GALLIUM_VDPAU_LINKER_FLAGS = \
64 -module \
65 -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
66 -export-symbols-regex $(VDPAU_EXPORTS) \
67 -shared \
68 -no-undefined
69
70 GALLIUM_XVMC_LINKER_FLAGS = \
71 -module \
72 -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
73 -shared \
74 -export-symbols-regex '^XvMC' \
75 -no-undefined
76
77 GALLIUM_OMX_LINKER_FLAGS = \
78 -shared \
79 -module \
80 -no-undefined \
81 -export-symbols-regex $(EXPORTS)
82
83 GALLIUM_VDPAU_LIB_DEPS = \
84 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
85 $(top_builddir)/src/gallium/state_trackers/vdpau/libvdpautracker.la \
86 $(VDPAU_LIBS) \
87 $(LIBDRM_LIBS) \
88 -lm \
89 $(CLOCK_LIB) \
90 $(PTHREAD_LIBS) \
91 $(DLOPEN_LIBS)
92
93 GALLIUM_XVMC_LIB_DEPS = \
94 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
95 $(top_builddir)/src/gallium/state_trackers/xvmc/libxvmctracker.la \
96 $(XVMC_LIBS) \
97 $(LIBDRM_LIBS)
98
99 GALLIUM_OMX_LIB_DEPS = \
100 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
101 $(top_builddir)/src/gallium/state_trackers/omx/libomxtracker.la \
102 $(GALLIUM_DRI_LIB_DEPS) \
103 $(OMX_LIBS)
104
105 GALLIUM_WINSYS_CFLAGS = \
106 -I$(top_srcdir)/include \
107 -I$(top_srcdir)/src/gallium/include \
108 -I$(top_srcdir)/src/gallium/auxiliary \
109 $(DEFINES) \
110 $(VISIBILITY_CFLAGS)
111
112 if HAVE_MESA_LLVM
113
114 GALLIUM_DRI_LINKER_FLAGS += $(LLVM_LDFLAGS)
115 GALLIUM_VDPAU_LINKER_FLAGS += $(LLVM_LDFLAGS)
116 GALLIUM_XVMC_LINKER_FLAGS += $(LLVM_LDFLAGS)
117 GALLIUM_OMX_LINKER_FLAGS += $(LLVM_LDFLAGS)
118
119 GALLIUM_DRI_LIB_DEPS += $(LLVM_LIBS)
120 GALLIUM_VDPAU_LIB_DEPS += $(LLVM_LIBS)
121 GALLIUM_XVMC_LIB_DEPS += $(LLVM_LIBS)
122 GALLIUM_OMX_LIB_DEPS += $(LLVM_LIBS)
123
124 endif