gallium/tests/trivial: use CXX to do final link
[mesa.git] / src / gallium / tests / trivial / Makefile
index bfcbdd9712db59f3ef7e0d188c7010f93b67bc73..d47cb2a4b4f8bcdd3cb026e28d33205c522b2d90 100644 (file)
@@ -11,8 +11,15 @@ INCLUDES = \
        -I$(TOP)/src/gallium/winsys \
        $(PROG_INCLUDES)
 
-LINKS = \
+ifeq ($(MESA_LLVM),1)
+LINKS = $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a
+LDFLAGS += $(LLVM_LDFLAGS)
+endif
+
+LINKS += \
+       $(TOP)/src/gallium/drivers/rbug/librbug.a \
        $(TOP)/src/gallium/drivers/trace/libtrace.a \
+       $(TOP)/src/gallium/drivers/galahad/libgalahad.a \
        $(TOP)/src/gallium/winsys/sw/null/libws_null.a \
        $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
        $(GALLIUM_AUXILIARIES) \
@@ -26,6 +33,9 @@ OBJECTS = $(SOURCES:.c=.o)
 
 PROGS = $(OBJECTS:.o=)
 
+PROG_DEFINES = \
+       -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_GALAHAD
+
 ##### TARGETS #####
 
 default: $(PROGS)
@@ -41,4 +51,4 @@ $(OBJECTS): %.o: %.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $(PROG_DEFINES) $< -o $@
 
 $(PROGS): %: %.o $(LINKS)
-       $(CC) $(LDFLAGS) $< $(LINKS) -lm -lpthread -ldl -o $@
+       $(CXX) $(LDFLAGS) $< $(LINKS) $(LLVM_LIBS) -lm -lpthread -ldl -o $@