gallium: Fix build with llvm installed in non-standard location
authorChristopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Fri, 11 Jun 2010 10:33:44 +0000 (20:33 +1000)
committerJakob Bornecrantz <jakob@vmware.com>
Fri, 23 Jul 2010 22:38:07 +0000 (23:38 +0100)
The es1, es2 and gl state trackers include draw_pipe.h, which includes
the llvm headers if MESA_LLVM is true, so we also need to add the
llvm seachpaths.

Similarly, gallivm and other gallium drivers need LLVM_CFLAGS to build when enabled.

Also fix xorg drivers, they didn't include LDFLAGS.

src/gallium/Makefile.template
src/gallium/targets/Makefile.xorg
src/mesa/Makefile

index 43203b1756ee9346cc88b612550a2a746e55914d..bff399ec64f6252f59efcde36b62edc06062a1cf 100644 (file)
@@ -23,6 +23,10 @@ INCLUDES = \
        -I$(TOP)/src/gallium/drivers \
        $(LIBRARY_INCLUDES)
 
+ifeq ($(MESA_LLVM),1)
+LIBRARY_DEFINES += $(LLVM_CFLAGS)
+endif
+
 
 ##### TARGETS #####
 
index c2d00649789f11284760a6d1bbcc1fd3a6f3444b..762c905985e3608d796e1fb0ae3ec838ad6083bb 100644 (file)
@@ -42,7 +42,7 @@ endif
 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
 
 $(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES)
-       $(MKLIB) -noprefix -o $@ $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
+       $(MKLIB) -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
 
 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
        rm -f depend
index 3e0f010671ceff6a9ce2ad823fff3fe1b8bddf8f..7073c92240b3c55d8efb1c2a7645b9fb72a24f7d 100644 (file)
@@ -20,6 +20,13 @@ MESA_CPPFLAGS := $(API_DEFINES)
 ES1_CPPFLAGS := -DFEATURE_ES1=1
 ES2_CPPFLAGS := -DFEATURE_ES2=1
 
+ifeq ($(MESA_LLVM),1)
+MESA_CPPFLAGS += $(LLVM_CFLAGS)
+ES1_CPPFLAGS += $(LLVM_CFLAGS)
+ES2_CPPFLAGS += $(LLVM_CFLAGS)
+endif
+
+
 include sources.mak
 
 # adjust object dirs