Merge remote branch 'origin/master' into glsl2
[mesa.git] / src / gallium / targets / libgl-xlib / Makefile
1 # src/gallium/targets/libgl-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/mapi \
19 -I$(TOP)/src/mesa \
20 -I$(TOP)/src/mesa/main \
21 -I$(TOP)/src/gallium/include \
22 -I$(TOP)/src/gallium/drivers \
23 -I$(TOP)/src/gallium/state_trackers/glx/xlib \
24 -I$(TOP)/src/gallium/auxiliary \
25 $(X11_CFLAGS)
26
27 DEFINES += \
28 -DGALLIUM_SOFTPIPE
29 #-DGALLIUM_CELL will be defined by the config */
30
31 XLIB_TARGET_SOURCES = \
32 xlib.c
33
34
35 XLIB_TARGET_OBJECTS = $(XLIB_TARGET_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/gallium/winsys/sw/xlib/libws_xlib.a \
44 $(TOP)/src/gallium/drivers/trace/libtrace.a \
45 $(TOP)/src/gallium/drivers/rbug/librbug.a \
46 $(TOP)/src/gallium/drivers/identity/libidentity.a \
47 $(TOP)/src/mapi/glapi/libglapi.a \
48 $(TOP)/src/mesa/libmesagallium.a \
49 $(GALLIUM_AUXILIARIES) \
50 $(CELL_SPU_LIB) \
51
52
53 .SUFFIXES : .cpp
54
55 .c.o:
56 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
57
58 .cpp.o:
59 $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
60
61
62
63 default: $(TOP)/$(LIB_DIR)/gallium $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME)
64
65 $(TOP)/$(LIB_DIR)/gallium:
66 @ mkdir -p $(TOP)/$(LIB_DIR)/gallium
67
68 # Make the libGL.so library
69 $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME): $(XLIB_TARGET_OBJECTS) $(LIBS) Makefile
70 $(TOP)/bin/mklib -o $(GL_LIB) \
71 -linker "$(CC)" \
72 -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
73 -install $(TOP)/$(LIB_DIR)/gallium \
74 $(MKLIB_OPTIONS) $(XLIB_TARGET_OBJECTS) \
75 -Wl,--start-group $(LIBS) -Wl,--end-group $(GL_LIB_DEPS)
76
77
78 depend: $(XLIB_TARGET_SOURCES)
79 @ echo "running $(MKDEP)"
80 @ rm -f depend # workaround oops on gutsy?!?
81 @ touch depend
82 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(XLIB_TARGET_SOURCES) \
83 > /dev/null 2>/dev/null
84
85
86 install: default
87 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
88 $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
89 $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL
90 @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
91 $(MINSTALL) $(TOP)/$(LIB_DIR)/libGL* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
92 fi
93
94
95 # Emacs tags
96 tags:
97 etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
98
99 clean:
100 -rm -f *.o depend
101
102
103 include depend