summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/Makefile
blob: e3af41c6e04486f77da9e6f039c06d511fa7fb6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
TOP = ../../..
include $(TOP)/configs/current

LIBNAME = gallium

C_SOURCES = \
	cso_cache/cso_context.c \
	cso_cache/cso_cache.c \
	cso_cache/cso_hash.c \
	draw/draw_context.c \
	draw/draw_gs.c \
	draw/draw_pipe.c \
	draw/draw_pipe_aaline.c \
	draw/draw_pipe_aapoint.c \
	draw/draw_pipe_clip.c \
	draw/draw_pipe_cull.c \
	draw/draw_pipe_flatshade.c \
	draw/draw_pipe_offset.c \
	draw/draw_pipe_pstipple.c \
	draw/draw_pipe_stipple.c \
	draw/draw_pipe_twoside.c \
	draw/draw_pipe_unfilled.c \
	draw/draw_pipe_util.c \
	draw/draw_pipe_validate.c \
	draw/draw_pipe_vbuf.c \
	draw/draw_pipe_wide_line.c \
	draw/draw_pipe_wide_point.c \
	draw/draw_pt.c \
	draw/draw_pt_elts.c \
	draw/draw_pt_emit.c \
	draw/draw_pt_fetch.c \
	draw/draw_pt_fetch_emit.c \
	draw/draw_pt_fetch_shade_emit.c \
	draw/draw_pt_fetch_shade_pipeline.c \
	draw/draw_pt_post_vs.c \
	draw/draw_pt_util.c \
	draw/draw_pt_varray.c \
	draw/draw_pt_vcache.c \
	draw/draw_vertex.c \
	draw/draw_vs.c \
	draw/draw_vs_varient.c \
	draw/draw_vs_aos.c \
	draw/draw_vs_aos_io.c \
	draw/draw_vs_aos_machine.c \
	draw/draw_vs_exec.c \
	draw/draw_vs_llvm.c \
	draw/draw_vs_ppc.c \
	draw/draw_vs_sse.c \
	indices/u_indices_gen.c \
	indices/u_unfilled_gen.c \
	pipebuffer/pb_buffer_fenced.c \
	pipebuffer/pb_buffer_malloc.c \
	pipebuffer/pb_bufmgr_alt.c \
	pipebuffer/pb_bufmgr_cache.c \
	pipebuffer/pb_bufmgr_debug.c \
	pipebuffer/pb_bufmgr_fenced.c \
	pipebuffer/pb_bufmgr_mm.c \
	pipebuffer/pb_bufmgr_ondemand.c \
	pipebuffer/pb_bufmgr_pool.c \
	pipebuffer/pb_bufmgr_slab.c \
	pipebuffer/pb_validate.c \
	rbug/rbug_connection.c \
	rbug/rbug_core.c \
	rbug/rbug_texture.c \
	rbug/rbug_context.c \
	rbug/rbug_shader.c \
	rbug/rbug_demarshal.c \
	rtasm/rtasm_cpu.c \
	rtasm/rtasm_execmem.c \
	rtasm/rtasm_x86sse.c \
	rtasm/rtasm_ppc.c \
	rtasm/rtasm_ppc_spe.c \
	tgsi/tgsi_sanity.c \
	tgsi/tgsi_build.c \
	tgsi/tgsi_dump.c \
	tgsi/tgsi_exec.c \
	tgsi/tgsi_info.c \
	tgsi/tgsi_iterate.c \
	tgsi/tgsi_parse.c \
	tgsi/tgsi_ppc.c \
	tgsi/tgsi_scan.c \
	tgsi/tgsi_sse2.c \
	tgsi/tgsi_text.c \
	tgsi/tgsi_transform.c \
	tgsi/tgsi_ureg.c \
	tgsi/tgsi_util.c \
	translate/translate_generic.c \
	translate/translate_sse.c \
	translate/translate.c \
	translate/translate_cache.c \
	util/u_debug.c \
	util/u_debug_dump.c \
	util/u_debug_symbol.c \
	util/u_debug_stack.c \
	util/u_blit.c \
	util/u_blitter.c \
	util/u_cache.c \
	util/u_cpu_detect.c \
	util/u_dl.c \
	util/u_draw_quad.c \
	util/u_format.c \
	util/u_format_access.c \
	util/u_format_table.c \
	util/u_gen_mipmap.c \
	util/u_handle_table.c \
	util/u_hash_table.c \
	util/u_hash.c \
	util/u_keymap.c \
	util/u_linear.c \
	util/u_network.c \
	util/u_math.c \
	util/u_mm.c \
	util/u_rect.c \
	util/u_simple_shaders.c \
	util/u_snprintf.c \
	util/u_stream_stdc.c \
	util/u_stream_wd.c \
	util/u_surface.c \
	util/u_texture.c \
	util/u_tile.c \
	util/u_time.c \
	util/u_timed_winsys.c \
	util/u_upload_mgr.c \
	util/u_simple_screen.c \
	vl/vl_bitstream_parser.c \
	vl/vl_mpeg12_mc_renderer.c \
	vl/vl_compositor.c \
	vl/vl_csc.c \
	vl/vl_shader_build.c

GALLIVM_SOURCES = \
	gallivm/gallivm.cpp  \
	gallivm/gallivm_cpu.cpp \
	gallivm/instructions.cpp  \
	gallivm/loweringpass.cpp \
	gallivm/tgsitollvm.cpp \
	gallivm/storage.cpp \
	gallivm/storagesoa.cpp \
	gallivm/instructionssoa.cpp

INC_SOURCES = \
	gallivm/gallivm_builtins.cpp \
	gallivm/gallivmsoabuiltins.cpp

# XXX: gallivm doesn't build correctly so disable for now
#ifeq ($(MESA_LLVM),1)
#DEFINES += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
#CPP_SOURCES += \
#	$(GALLIVM_SOURCES)
#endif


include ../Makefile.template


gallivm/gallivm_builtins.cpp: gallivm/llvm_builtins.c
	clang --emit-llvm < $< |llvm-as|opt -std-compile-opts > temp1.bin
	(echo "static const unsigned char llvm_builtins_data[] = {"; od -txC temp1.bin | sed -e "s/^[0-9]*//" -e s"/ \([0-9a-f][0-9a-f]\)/0x\1,/g" -e"\$$d" | sed -e"\$$s/,$$/,0x00};/") >$@
	rm temp1.bin

gallivm/gallivmsoabuiltins.cpp: gallivm/soabuiltins.c
	clang --emit-llvm < $< |llvm-as|opt -std-compile-opts > temp2.bin
	(echo "static const unsigned char soabuiltins_data[] = {"; od -txC temp2.bin | sed -e "s/^[0-9]*//" -e s"/ \([0-9a-f][0-9a-f]\)/0x\1,/g" -e"\$$d" | sed -e"\$$s/,$$/,0x00};/") >$@
	rm temp2.bin


indices/u_indices_gen.c: indices/u_indices_gen.py
	python $< > $@

indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
	python $< > $@

util/u_format_table.c: util/u_format_table.py util/u_format_parse.py util/u_format.csv
	python util/u_format_table.py util/u_format.csv > $@

util/u_format_access.c: util/u_format_access.py util/u_format_parse.py util/u_format.csv
	python util/u_format_access.py util/u_format.csv > $@