4 include $(TOP
)/configs
/current
11 GL_TINY
= 0$(MESA_MAJOR
)0$(MESA_MINOR
)0$(MESA_TINY
)
14 SOFTPIPE_LIB
= $(TOP
)/src
/mesa
/pipe
/softpipe
/libsoftpipe.a
19 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
22 $(CXX
) -c
$(INCLUDE_DIRS
) $(CXXFLAGS
) $< -o
$@
25 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
28 # Figure out what to make here
30 @if
[ "${DRIVER_DIRS}" = "dri" ] ; then \
31 $(MAKE
) linux-solo
; \
32 elif
[ "${DRIVER_DIRS}" = "osmesa" ] ; then \
33 $(MAKE
) osmesa-only
; \
34 elif
[ "$(DRIVER_DIRS)" = "beos" ]; then \
36 elif
[ "$(DRIVER_DIRS)" = "directfb" ]; then \
38 elif
[ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \
39 $(MAKE
) fbdev
; $(MAKE
) osmesa-only
; \
41 $(MAKE
) stand-alone
; \
45 ######################################################################
48 beos
: depend subdirs libmesa.a
49 cd drivers
/beos
; $(MAKE
)
52 ######################################################################
55 # Make archive of core object files
56 libmesa.a
: $(SOLO_OBJECTS
)
57 @
$(TOP
)/bin
/mklib
-o mesa
-static
$(SOLO_OBJECTS
);
58 @if
[ "${CONFIG_NAME}" = "beos" ] ; then \
62 linux-solo
: depend subdirs libmesa.a
63 cd drivers
/dri
; $(MAKE
)
66 #####################################################################
67 # Stand-alone Mesa libGL, no built-in drivers (DirectFB)
69 libgl-core
: $(CORE_OBJECTS
)
70 @
$(TOP
)/bin
/mklib
-o
$(GL_LIB
) -linker
'$(CC)' \
71 -major
$(MESA_MAJOR
) -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
72 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) $(CORE_OBJECTS
) \
75 directfb
: depend subdirs libgl-core
76 cd drivers
/directfb
; $(MAKE
)
79 #####################################################################
80 # fbdev Mesa driver (libGL.so)
82 fbdev
: $(CORE_OBJECTS
) $(FBDEV_DRIVER_OBJECTS
) $(COMMON_DRIVER_OBJECTS
)
83 @
$(TOP
)/bin
/mklib
-o
$(GL_LIB
) -linker
'$(CC)' \
84 -major
$(MESA_MAJOR
) -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
85 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
86 $(CORE_OBJECTS
) $(FBDEV_DRIVER_OBJECTS
) \
87 $(COMMON_DRIVER_OBJECTS
) $(GL_LIB_DEPS
)
90 ######################################################################
91 # Stand-alone Mesa libGL and libOSMesa
92 STAND_ALONE_DRIVER_SOURCES
= \
93 $(COMMON_DRIVER_SOURCES
) \
96 STAND_ALONE_DRIVER_OBJECTS
= $(STAND_ALONE_DRIVER_SOURCES
:.c
=.o
)
98 STAND_ALONE_OBJECTS
= \
100 $(STAND_ALONE_DRIVER_OBJECTS
)
102 # For libOSMesa16 or libOSMesa32 we link _all_ the objects into the library,
103 # not just the osmesa.o object (i.e. we don't have a libGL).
106 $(COMMON_DRIVER_OBJECTS
) \
107 $(OSMESA_DRIVER_OBJECTS
)
110 stand-alone
: depend subdirs
$(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
)
112 osmesa-only
: depend subdirs
$(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
)
114 # Make the GL library
115 $(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
): $(STAND_ALONE_OBJECTS
) $(SOFTPIPE_LIB
)
116 @
$(TOP
)/bin
/mklib
-o
$(GL_LIB
) -linker
'$(CC)' \
117 -major
$(GL_MAJOR
) -minor
$(GL_MINOR
) -patch
$(GL_TINY
) \
118 -install $(TOP
)/$(LIB_DIR
) \
119 $(MKLIB_OPTIONS
) $(GL_LIB_DEPS
) $(STAND_ALONE_OBJECTS
) \
122 # Make the OSMesa library
123 $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
): $(OSMESA_DRIVER_OBJECTS
) $(OSMESA16_OBJECTS
)
124 @ if
[ "${DRIVER_DIRS}" = "osmesa" ] ; then \
125 $(TOP
)/bin
/mklib
-o
$(OSMESA_LIB
) -linker
'$(CC)' \
126 -major
$(MESA_MAJOR
) \
127 -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
128 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
129 $(OSMESA_LIB_DEPS
) $(OSMESA16_OBJECTS
) ; \
131 $(TOP
)/bin
/mklib
-o
$(OSMESA_LIB
) -linker
'$(CC)' \
132 -major
$(MESA_MAJOR
) \
133 -minor
$(MESA_MINOR
) -patch
$(GL_TINY
) \
134 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
135 $(OSMESA_LIB_DEPS
) $(OSMESA_DRIVER_OBJECTS
) ; \
139 ######################################################################
142 depend
: $(ALL_SOURCES
)
143 @ echo
"running $(MKDEP)"
144 @
rm -f depend
# workaround oops on gutsy?!?
146 @
$(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(ALL_SOURCES
) \
147 > /dev
/null
2>/dev
/null
152 @
(cd x86-64
; $(MAKE
))
156 $(INSTALL
) -d
$(INSTALL_DIR
)/include/GL
157 $(INSTALL
) -d
$(INSTALL_DIR
)/$(LIB_DIR
)
158 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h
$(INSTALL_DIR
)/include/GL
159 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
) ]; then \
160 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/libGL
* $(INSTALL_DIR
)/$(LIB_DIR
); \
162 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
) ]; then \
163 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/libOSMesa
* $(INSTALL_DIR
)/$(LIB_DIR
); \
165 @if
[ "${DRIVER_DIRS}" = "dri" ] ; then \
166 cd drivers
/dri
; $(MAKE
) install ; \
169 ## NOT INSTALLED YET:
170 ## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
171 ## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
176 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
181 -rm -f depend depend.bak libmesa.a
183 (cd drivers
/dri
&& $(MAKE
) clean)
184 (cd x86
&& $(MAKE
) clean)
185 (cd x86-64
&& $(MAKE
) clean)
186 (cd pipe
; $(MAKE
) clean )