1 # src/gallium/targets/Makefile.xorg
3 # Template makefile for gallium xorg drivers.
6 # The minimum that the including makefile needs to define
7 # is TOP, LIBNAME and one of of the *_SOURCES.
10 # DRIVER_INCLUDES are appended to the list of includes directories.
11 # DRIVER_DEFINES is not used for makedepend, but for compilation.
12 # DRIVER_PIPES are pipe drivers and modules that the driver depends on.
13 # DRIVER_LINKS are flags given to the linker.
17 OBJECTS = $(C_SOURCES:.c=.o) \
18 $(CPP_SOURCES:.cpp=.o) \
22 $(shell $(PKG_CONFIG) --cflags-only-I pixman-1 xorg-server libdrm xproto) \
23 -I$(TOP)/src/gallium/include \
24 -I$(TOP)/src/gallium/drivers \
25 -I$(TOP)/src/gallium/auxiliary \
26 -I$(TOP)/src/gallium/winsys \
29 LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
32 LDFLAGS += $(LLVM_LDFLAGS)
33 DRIVER_LINKS += $(LLVM_LIBS) -lm -ldl
36 ifeq ($(LINK_WITH_CXX),1)
46 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
48 $(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES)
49 $(MKLIB) -linker '$(LD)' -noprefix -o $@ -ldflags '$(LDFLAGS)' $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
51 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
54 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
56 $(LIBNAME_STAGING): $(LIBNAME)
57 $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
59 $(TOP)/$(LIB_DIR)/gallium:
63 rm -f $(OBJECTS) $(GENERATED_SOURCES) $(LIBNAME) depend depend.bak
66 $(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
67 $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
73 $(CC) -S $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
76 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
79 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
82 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
86 .PHONY: default clean install