r600g: Fix out of tree builds that use the LLVM backend
[mesa.git] / src / gallium / drivers / r600 / Makefile.am
1 include Makefile.sources
2
3 noinst_LIBRARIES = libr600.a
4
5 AM_CFLAGS = \
6 -I$(top_srcdir)/src/gallium/include \
7 -I$(top_srcdir)/src/gallium/auxiliary \
8 -I$(top_srcdir)/src/gallium/drivers \
9 -I$(top_srcdir)/include \
10 $(RADEON_CFLAGS) \
11 $(DEFINES) \
12 $(ARCH_FLAGS) \
13 $(ASM_FLAGS) \
14 $(OPT_FLAGS) \
15 $(PIC_FLAGS) \
16 $(VISIBILITY_CFLAGS)
17
18 libr600_a_SOURCES = \
19 $(C_SOURCES)
20
21 if USE_R600_LLVM_COMPILER
22
23 # This is a hack until we can move the backend into the LLVM project.
24 # We need to use mklib, because it splits up libradeon.a into object files
25 # so that we can link it with the r600 objects.
26 libr600_a_AR = $(top_srcdir)/bin/mklib -o r600 -static
27
28 libr600_a_SOURCES += \
29 $(LLVM_C_SOURCES)
30
31 libr600_a_LIBADD = \
32 $(top_builddir)/src/gallium/drivers/radeon/libradeon.a
33
34 AM_CFLAGS += \
35 $(LLVM_CFLAGS) \
36 -I$(top_srcdir)/src/gallium/drivers/radeon/ \
37 -DR600_USE_LLVM
38
39 AM_CXXFLAGS= \
40 $(LLVM_CXXFLAGS)
41 else
42 libr600_a_AR = $(AR) $(ARFLAGS)
43 endif