intel: fix the wrong code to detect null texture.
[mesa.git] / src / gallium / targets / Makefile.dri
1 # -*-makefile-*-
2
3
4 ifeq ($(MESA_LLVM),1)
5 LDFLAGS += $(LLVM_LDFLAGS)
6 DRIVER_EXTRAS = $(LLVM_LIBS)
7 else
8 LDFLAGS += -lstdc++
9 endif
10
11 MESA_MODULES = \
12 $(TOP)/src/mesa/libmesagallium.a \
13 $(GALLIUM_AUXILIARIES)
14
15 COMMON_GALLIUM_SOURCES = \
16 $(TOP)/src/mesa/drivers/dri/common/utils.c \
17 $(TOP)/src/mesa/drivers/dri/common/vblank.c \
18 $(TOP)/src/mesa/drivers/dri/common/dri_util.c \
19 $(TOP)/src/mesa/drivers/dri/common/xmlconfig.c
20
21 COMMON_SOURCES = $(COMMON_GALLIUM_SOURCES) \
22 $(TOP)/src/mesa/drivers/common/driverfuncs.c \
23 $(TOP)/src/mesa/drivers/dri/common/texmem.c \
24 $(TOP)/src/mesa/drivers/dri/common/drirenderbuffer.c
25
26 COMMON_BM_SOURCES = \
27 $(TOP)/src/mesa/drivers/dri/common/dri_bufmgr.c \
28 $(TOP)/src/mesa/drivers/dri/common/dri_drmpool.c
29
30 INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
31
32 OBJECTS = \
33 $(C_SOURCES:.c=.o) \
34 $(ASM_SOURCES:.S=.o)
35
36
37 ### Include directories
38 SHARED_INCLUDES = \
39 -I. \
40 -I$(TOP)/src/mesa/drivers/dri/common \
41 -Iserver \
42 -I$(TOP)/include \
43 -I$(TOP)/include/GL/internal \
44 -I$(TOP)/src/mapi \
45 -I$(TOP)/src/gallium/include \
46 -I$(TOP)/src/gallium/auxiliary \
47 -I$(TOP)/src/gallium/drivers \
48 -I$(TOP)/src/gallium/winsys \
49 -I$(TOP)/src/mesa \
50 -I$(TOP)/src/mesa/main \
51 -I$(TOP)/src/mesa/math \
52 -I$(TOP)/src/mesa/transform \
53 -I$(TOP)/src/mesa/shader \
54 -I$(TOP)/src/mesa/swrast \
55 -I$(TOP)/src/mesa/swrast_setup \
56 -I$(TOP)/src/egl/main \
57 -I$(TOP)/src/egl/drivers/dri \
58 $(LIBDRM_CFLAGS)
59
60 LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
61
62
63 ##### RULES #####
64
65 .c.o:
66 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
67
68 .S.o:
69 $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
70
71
72 ##### TARGETS #####
73
74 default: depend symlinks $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
75
76 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) Makefile \
77 $(TOP)/src/mesa/drivers/dri/Makefile.targets $(TOP)/src/mesa/drivers/dri/common/dri_test.o
78 $(MKLIB) -o $@.tmp -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
79 $(OBJECTS) $(PIPE_DRIVERS) \
80 -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \
81 $(DRI_LIB_DEPS) $(DRIVER_EXTRAS)
82 $(CXX) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS) $(LDFLAGS);
83 @rm -f $@.test
84 mv -f $@.tmp $@
85
86 $(TOP)/$(LIB_DIR)/gallium:
87 mkdir -p $@
88
89 $(LIBNAME_STAGING): $(LIBNAME)
90 $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)/gallium
91
92 depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
93 rm -f depend
94 touch depend
95 $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
96 $(ASM_SOURCES) 2> /dev/null
97
98
99 # Emacs tags
100 tags:
101 etags `find . -name \*.[ch]` `find ../include`
102
103
104 # Remove .o and backup files
105 clean:
106 -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
107 -rm -f depend depend.bak
108
109
110 install: $(LIBNAME)
111 $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
112 $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
113
114
115 include depend