Merge commit 'origin/master' into gallium-0.2
[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 XLIB_WINSYS_SOURCES = \
26 xlib.c \
27 xlib_cell.c \
28 xlib_brw_aub.c \
29 xlib_brw_context.c \
30 xlib_brw_screen.c \
31 xlib_softpipe.c \
32 xlib_trace.c
33
34
35 XLIB_WINSYS_OBJECTS = $(XLIB_WINSYS_SOURCES:.c=.o)
36
37
38 # Note: CELL_SPU_LIB is only defined for cell configs
39
40 LIBS = \
41 $(GALLIUM_DRIVERS) \
42 $(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \
43 $(TOP)/src/mesa/libglapi.a \
44 $(TOP)/src/mesa/libmesa.a \
45 $(GALLIUM_AUXILIARIES) \
46 $(CELL_SPU_LIB) \
47
48
49 .SUFFIXES : .cpp
50
51 .c.o:
52 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
53
54 .cpp.o:
55 $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
56
57
58
59 default: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
60
61
62 # Make the libGL.so library
63 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(XLIB_WINSYS_OBJECTS) $(LIBS) Makefile
64 $(TOP)/bin/mklib -o $(GL_LIB) \
65 -linker "$(CC)" \
66 -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
67 -install $(TOP)/$(LIB_DIR) \
68 $(MKLIB_OPTIONS) $(XLIB_WINSYS_OBJECTS) \
69 --start-group $(LIBS) --end-group $(GL_LIB_DEPS)
70
71
72 depend: $(XLIB_WINSYS_SOURCES)
73 @ echo "running $(MKDEP)"
74 @ rm -f depend # workaround oops on gutsy?!?
75 @ touch depend
76 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(XLIB_WINSYS_SOURCES) \
77 > /dev/null 2>/dev/null
78
79
80 install: default
81 $(INSTALL) -d $(INSTALL_DIR)/include/GL
82 $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
83 $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
84 @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
85 $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* $(INSTALL_DIR)/$(LIB_DIR); \
86 fi
87
88
89 # Emacs tags
90 tags:
91 etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
92
93 clean:
94 -rm -f *.o
95
96
97 include depend