Merge commit 'origin/gallium-master-merge'
[mesa.git] / src / gallium / winsys / xlib / Makefile
1 # src/gallium/winsys/xlib/Makefile
2
3 # This makefile produces a "stand-alone" libGL.so which is based on
4 # Xlib (no DRI HW acceleration)
5
6
7 TOP = ../../../..
8 include $(TOP)/configs/current
9
10
11 GL_MAJOR = 1
12 GL_MINOR = 5
13 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
14
15
16 INCLUDE_DIRS = \
17 -I$(TOP)/include \
18 -I$(TOP)/src/mesa \
19 -I$(TOP)/src/mesa/main \
20 -I$(TOP)/src/gallium/include \
21 -I$(TOP)/src/gallium/drivers \
22 -I$(TOP)/src/gallium/state_trackers/glx/xlib \
23 -I$(TOP)/src/gallium/auxiliary
24
25 DEFINES += \
26 -DGALLIUM_SOFTPIPE \
27 -DGALLIUM_TRACE \
28 -DGALLIUM_BRW
29 #-DGALLIUM_CELL will be defined by the config */
30
31 XLIB_WINSYS_SOURCES = \
32 xlib.c \
33 xlib_cell.c \
34 xlib_brw_aub.c \
35 xlib_brw_context.c \
36 xlib_brw_screen.c \
37 xlib_softpipe.c \
38 xlib_trace.c
39
40
41 XLIB_WINSYS_OBJECTS = $(XLIB_WINSYS_SOURCES:.c=.o)
42
43
44 # Note: CELL_SPU_LIB is only defined for cell configs
45
46 LIBS = \
47 $(GALLIUM_DRIVERS) \
48 $(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \
49 $(TOP)/src/mesa/libglapi.a \
50 $(TOP)/src/mesa/libmesagallium.a \
51 $(GALLIUM_AUXILIARIES) \
52 $(CELL_SPU_LIB) \
53
54
55 .SUFFIXES : .cpp
56
57 .c.o:
58 $(CC) -c $(INCLUDE_DIRS) $(DEFINES) $(CFLAGS) $< -o $@
59
60 .cpp.o:
61 $(CXX) -c $(INCLUDE_DIRS) $(DEFINES) $(CXXFLAGS) $< -o $@
62
63
64
65 default: $(TOP)/$(LIB_DIR)/gallium $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME)
66
67 $(TOP)/$(LIB_DIR)/gallium:
68 @ mkdir -p $(TOP)/$(LIB_DIR)/gallium
69
70 # Make the libGL.so library
71 $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME): $(XLIB_WINSYS_OBJECTS) $(LIBS) Makefile
72 $(TOP)/bin/mklib -o $(GL_LIB) \
73 -linker "$(CC)" \
74 -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
75 -install $(TOP)/$(LIB_DIR)/gallium \
76 $(MKLIB_OPTIONS) $(XLIB_WINSYS_OBJECTS) \
77 --start-group $(LIBS) --end-group $(GL_LIB_DEPS)
78
79
80 depend: $(XLIB_WINSYS_SOURCES)
81 @ echo "running $(MKDEP)"
82 @ rm -f depend # workaround oops on gutsy?!?
83 @ touch depend
84 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(XLIB_WINSYS_SOURCES) \
85 > /dev/null 2>/dev/null
86
87
88 install: default
89 $(INSTALL) -d $(INSTALL_DIR)/include/GL
90 $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
91 $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
92 @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
93 $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* $(INSTALL_DIR)/$(LIB_DIR); \
94 fi
95
96
97 # Emacs tags
98 tags:
99 etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
100
101 clean:
102 -rm -f *.o
103
104
105 include depend