X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Ftargets%2FMakefile.xorg;h=47040bb14c83ab31e079e572679fa4856bce9a1b;hb=226ae9d6c8f282de788404b4d98af7ddf8ee30f4;hp=e9f70591c27282e6be4e91e4ec395dfeeab2cba5;hpb=30456f775c8146d4559280589502eb4e5634f24b;p=mesa.git diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg index e9f70591c27..47040bb14c8 100644 --- a/src/gallium/targets/Makefile.xorg +++ b/src/gallium/targets/Makefile.xorg @@ -9,7 +9,8 @@ # Optional defines: # DRIVER_INCLUDES are appended to the list of includes directories. # DRIVER_DEFINES is not used for makedepend, but for compilation. -# DRIVER_LINKS are flags given to the linker +# DRIVER_PIPES are pipe drivers and modules that the driver depends on. +# DRIVER_LINKS are flags given to the linker. ### Basic defines ### @@ -27,13 +28,21 @@ INCLUDES = \ LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET) +ifeq ($(MESA_LLVM),1) +LD = $(CXX) +LDFLAGS += $(LLVM_LDFLAGS) +USE_CXX=1 +DRIVER_PIPES += $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a +DRIVER_LINKS += $(LLVM_LIBS) -lm -ldl +endif + ##### TARGETS ##### default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING) -$(LIBNAME): $(OBJECTS) Makefile $(LIBS) - $(MKLIB) -noprefix -o $@ $(OBJECTS) $(DRIVER_LINKS) +$(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) + $(MKLIB) -linker '$(CC)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS) depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES) rm -f depend @@ -57,16 +66,16 @@ install: ##### RULES ##### %.s: %.c - $(CC) -S $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ + $(CC) -S $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ %.o: %.c - $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ + $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ %.o: %.cpp - $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@ + $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@ %.o: %.S - $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ + $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ sinclude depend