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_LINKS are flags given to the linker
16 OBJECTS = $(C_SOURCES:.c=.o) \
17 $(CPP_SOURCES:.cpp=.o) \
21 $(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
22 -I$(TOP)/src/gallium/include \
23 -I$(TOP)/src/gallium/drivers \
24 -I$(TOP)/src/gallium/auxiliary \
27 LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
32 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
34 $(LIBNAME): $(OBJECTS) Makefile $(LIBS)
35 $(MKLIB) -noprefix -o $@ $(OBJECTS) $(DRIVER_LINKS)
37 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
40 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
42 $(LIBNAME_STAGING): $(LIBNAME)
43 $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
45 $(TOP)/$(LIB_DIR)/gallium:
49 rm -f $(OBJECTS) $(GENERATED_SOURCES) $(LIBNAME).a depend depend.bak
52 $(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
53 $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
59 $(CC) -S $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
62 $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
65 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
68 $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
72 .PHONY: default clean install