Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
[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/auxiliary
23
24 XLIB_WINSYS_SOURCES = \
25 glxapi.c \
26 fakeglx.c \
27 xfonts.c \
28 xm_api.c \
29 xm_winsys.c \
30 xm_winsys_aub.c \
31 brw_aub.c
32
33 XLIB_WINSYS_OBJECTS = $(XLIB_WINSYS_SOURCES:.c=.o)
34
35
36 ifeq ($(CONFIG_NAME), linux-cell)
37 # The SPU code is in a separate .a file, unfortunately
38 CELL_SPU_LIB = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a
39 endif
40
41 LIBS = \
42 $(GALLIUM_DRIVERS) \
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)
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: $(ALL_SOURCES)
73 @ echo "running $(MKDEP)"
74 @ rm -f depend # workaround oops on gutsy?!?
75 @ touch depend
76 @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_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