4 include $(TOP
)/configs
/current
11 GL_TINY
= 0$(MESA_MAJOR
)0$(MESA_MINOR
)0$(MESA_TINY
)
17 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
20 $(CXX
) -c
$(INCLUDE_DIRS
) $(CXXFLAGS
) $< -o
$@
23 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
26 # Figure out what to make here
28 @if
[ "${DRIVER_DIRS}" = "dri" ] ; then \
29 $(MAKE
) linux-solo
; \
30 elif
[ "${DRIVER_DIRS}" = "osmesa" ] ; then \
31 $(MAKE
) osmesa-only
; \
32 elif
[ "$(DRIVER_DIRS)" = "beos" ]; then \
34 elif
[ "$(DRIVER_DIRS)" = "directfb" ]; then \
36 elif
[ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \
37 $(MAKE
) fbdev
; $(MAKE
) osmesa-only
; \
39 $(MAKE
) stand-alone
; \
43 ######################################################################
46 beos
: depend subdirs libmesa.a
47 cd drivers
/beos
; $(MAKE
)
50 ######################################################################
53 # Make archive of core object files
54 libmesa.a
: $(SOLO_OBJECTS
)
55 @
$(TOP
)/bin
/mklib
-o mesa
-static
$(SOLO_OBJECTS
);
56 @if
[ "${CONFIG_NAME}" = "beos" ] ; then \
60 linux-solo
: depend subdirs libmesa.a
61 cd drivers
/dri
; $(MAKE
)
64 #####################################################################
65 # Stand-alone Mesa libGL, no built-in drivers (DirectFB)
67 libgl-core
: $(CORE_OBJECTS
)
68 @
$(TOP
)/bin
/mklib
-o
$(GL_LIB
) -linker
'$(CC)' \
69 -major
$(MESA_MAJOR
) -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
70 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) $(CORE_OBJECTS
) \
73 directfb
: depend subdirs libgl-core
74 cd drivers
/directfb
; $(MAKE
)
77 #####################################################################
78 # fbdev Mesa driver (libGL.so)
80 fbdev
: $(CORE_OBJECTS
) $(FBDEV_DRIVER_OBJECTS
) $(COMMON_DRIVER_OBJECTS
)
81 @
$(TOP
)/bin
/mklib
-o
$(GL_LIB
) -linker
'$(CC)' \
82 -major
$(MESA_MAJOR
) -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
83 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
84 $(CORE_OBJECTS
) $(FBDEV_DRIVER_OBJECTS
) \
85 $(COMMON_DRIVER_OBJECTS
) $(GL_LIB_DEPS
)
88 ######################################################################
89 # Stand-alone Mesa libGL and libOSMesa
90 STAND_ALONE_DRIVER_SOURCES
= \
91 $(COMMON_DRIVER_SOURCES
) \
94 STAND_ALONE_DRIVER_OBJECTS
= $(STAND_ALONE_DRIVER_SOURCES
:.c
=.o
)
96 STAND_ALONE_OBJECTS
= \
98 $(STAND_ALONE_DRIVER_OBJECTS
)
100 # For libOSMesa16 or libOSMesa32 we link _all_ the objects into the library,
101 # not just the osmesa.o object (i.e. we don't have a libGL).
104 $(COMMON_DRIVER_OBJECTS
) \
105 $(OSMESA_DRIVER_OBJECTS
)
108 stand-alone
: depend subdirs
$(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
)
110 osmesa-only
: depend subdirs
$(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
)
112 # Make the GL library
113 $(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
): $(STAND_ALONE_OBJECTS
)
114 @
$(TOP
)/bin
/mklib
-o
$(GL_LIB
) -linker
'$(CC)' \
115 -major
$(GL_MAJOR
) -minor
$(GL_MINOR
) -patch
$(GL_TINY
) \
116 -install $(TOP
)/$(LIB_DIR
) \
117 $(MKLIB_OPTIONS
) $(GL_LIB_DEPS
) $(STAND_ALONE_OBJECTS
)
119 # Make the OSMesa library
120 $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
): $(OSMESA_DRIVER_OBJECTS
) $(OSMESA16_OBJECTS
)
121 @ if
[ "${DRIVER_DIRS}" = "osmesa" ] ; then \
122 $(TOP
)/bin
/mklib
-o
$(OSMESA_LIB
) -linker
'$(CC)' \
123 -major
$(MESA_MAJOR
) \
124 -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
125 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
126 $(OSMESA_LIB_DEPS
) $(OSMESA16_OBJECTS
) ; \
128 $(TOP
)/bin
/mklib
-o
$(OSMESA_LIB
) -linker
'$(CC)' \
129 -major
$(MESA_MAJOR
) \
130 -minor
$(MESA_MINOR
) -patch
$(GL_TINY
) \
131 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
132 $(OSMESA_LIB_DEPS
) $(OSMESA_DRIVER_OBJECTS
) ; \
136 ######################################################################
139 depend
: $(ALL_SOURCES
)
140 @ echo
"running $(MKDEP)"
142 @
$(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(ALL_SOURCES
) \
143 > /dev
/null
2>/dev
/null
148 @
(cd x86-64
; $(MAKE
))
152 $(INSTALL
) -d
$(INSTALL_DIR
)/include/GL
153 $(INSTALL
) -d
$(INSTALL_DIR
)/$(LIB_DIR
)
154 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h
$(INSTALL_DIR
)/include/GL
155 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
) ]; then \
156 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/libGL
* $(INSTALL_DIR
)/$(LIB_DIR
); \
158 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
) ]; then \
159 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/libOSMesa
* $(INSTALL_DIR
)/$(LIB_DIR
); \
161 @if
[ "${DRIVER_DIRS}" = "dri" ] ; then \
162 cd drivers
/dri
; $(MAKE
) install ; \
165 ## NOT INSTALLED YET:
166 ## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
167 ## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
172 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
177 -rm -f depend depend.bak libmesa.a
179 (cd drivers
/dri
&& $(MAKE
) clean)
180 (cd x86
&& $(MAKE
) clean)
181 (cd x86-64
&& $(MAKE
) clean)