1 # src/gallium/targets/libgl-xlib/Makefile
3 # This makefile produces a "stand-alone" libGL.so which is based on
4 # Xlib (no DRI HW acceleration)
8 include $(TOP
)/configs
/current
13 GL_TINY
= 0$(MESA_MAJOR
)$(MESA_MINOR
)0$(MESA_TINY
)
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 \
33 XLIB_TARGET_SOURCES
= \
37 XLIB_TARGET_OBJECTS
= $(XLIB_TARGET_SOURCES
:.c
=.o
)
43 $(TOP
)/src
/gallium
/state_trackers
/glx
/xlib
/libxlib.a \
44 $(TOP
)/src
/gallium
/winsys
/sw
/xlib
/libws_xlib.a \
45 $(TOP
)/src
/gallium
/drivers
/trace
/libtrace.a \
46 $(TOP
)/src
/gallium
/drivers
/rbug
/librbug.a \
47 $(TOP
)/src
/gallium
/drivers
/galahad
/libgalahad.a \
48 $(TOP
)/src
/mapi
/glapi
/libglapi.a \
49 $(TOP
)/src
/mesa
/libmesagallium.a \
50 $(GALLIUM_AUXILIARIES
) \
55 PIPE_DRIVERS
+= $(TOP
)/src
/gallium
/drivers
/llvmpipe
/libllvmpipe.a
56 DEFINES
+= -DGALLIUM_LLVMPIPE
57 GL_LIB_DEPS
+= $(LLVM_LIBS
)
58 LDFLAGS
+= $(LLVM_LDFLAGS
)
61 ifeq ($(SHARED_GLAPI
),1)
62 GL_LIB_DEPS
:= -L
$(TOP
)/$(LIB_DIR
) -l
$(GLAPI_LIB
) $(GL_LIB_DEPS
)
69 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
72 $(CXX
) -c
$(INCLUDE_DIRS
) $(CXXFLAGS
) $< -o
$@
76 default
: $(TOP
)/$(LIB_DIR
)/gallium
$(TOP
)/$(LIB_DIR
)/gallium
/$(GL_LIB_NAME
)
78 $(TOP
)/$(LIB_DIR
)/gallium
:
79 @ mkdir
-p
$(TOP
)/$(LIB_DIR
)/gallium
81 # Make the libGL.so library
82 $(TOP
)/$(LIB_DIR
)/gallium
/$(GL_LIB_NAME
): $(XLIB_TARGET_OBJECTS
) $(LIBS
) Makefile
83 $(TOP
)/bin
/mklib
-o
$(GL_LIB
) \
84 -linker
"$(CXX)" -ldflags '$(LDFLAGS)' \
85 -major
$(GL_MAJOR
) -minor
$(GL_MINOR
) -patch
$(GL_TINY
) \
87 -install $(TOP
)/$(LIB_DIR
)/gallium \
88 $(MKLIB_OPTIONS
) $(XLIB_TARGET_OBJECTS
) \
89 -Wl
,--start-group
$(LIBS
) -Wl
,--end-group
$(GL_LIB_DEPS
)
92 depend
: $(XLIB_TARGET_SOURCES
)
93 @ echo
"running $(MKDEP)"
94 @
rm -f depend
# workaround oops on gutsy?!?
96 $(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(XLIB_TARGET_SOURCES
) \
97 > /dev
/null
2>/dev
/null
101 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/include/GL
102 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
103 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h
$(DESTDIR
)$(INSTALL_DIR
)/include/GL
104 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
) ]; then \
105 $(MINSTALL
) $(TOP
)/$(LIB_DIR
)/libGL
* $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
); \
111 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h