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