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/$(TARGET)
33 LDFLAGS += $(LLVM_LDFLAGS)
35 DRIVER_PIPES += $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a
36 DRIVER_LINKS += $(LLVM_LIBS) -lm -ldl
42 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
44 $(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES)
45 $(MKLIB) -linker '$(CC)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
47 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
50 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
52 $(LIBNAME_STAGING): $(LIBNAME)
53 $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
55 $(TOP)/$(LIB_DIR)/gallium:
59 rm -f $(OBJECTS) $(GENERATED_SOURCES) $(LIBNAME).a depend depend.bak
62 $(INSTALL) -d $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
63 $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)/$(XORG_DRIVER_INSTALL_DIR)
69 $(CC) -S $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
72 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
75 $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
78 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
82 .PHONY: default clean install