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