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" ]; then \
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
) \
92 $(X11_DRIVER_SOURCES
) \
93 $(GLIDE_DRIVER_SOURCES
) \
94 $(SVGA_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
)
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
)
121 # Make the OSMesa library
122 $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
): $(OSMESA_DRIVER_OBJECTS
) $(OSMESA16_OBJECTS
)
123 @ if
[ "${DRIVER_DIRS}" = "osmesa" ] ; then \
124 $(TOP
)/bin
/mklib
-o
$(OSMESA_LIB
) -linker
'$(CC)' \
125 -major
$(MESA_MAJOR
) \
126 -minor
$(MESA_MINOR
) -patch
$(MESA_TINY
) \
127 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
128 $(OSMESA_LIB_DEPS
) $(OSMESA16_OBJECTS
) ; \
130 $(TOP
)/bin
/mklib
-o
$(OSMESA_LIB
) -linker
'$(CC)' \
131 -major
$(MESA_MAJOR
) \
132 -minor
$(MESA_MINOR
) -patch
$(GL_TINY
) \
133 -install $(TOP
)/$(LIB_DIR
) $(MKLIB_OPTIONS
) \
134 $(OSMESA_LIB_DEPS
) $(OSMESA_DRIVER_OBJECTS
) ; \
138 ######################################################################
141 depend
: $(ALL_SOURCES
)
142 @ echo
"running $(MKDEP)"
144 @
$(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(ALL_SOURCES
) \
150 @
(cd x86-64
; $(MAKE
))
154 $(INSTALL
) -d
$(INSTALL_DIR
)/include/GL
155 $(INSTALL
) -d
$(INSTALL_DIR
)/$(LIB_DIR
)
156 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h
$(INSTALL_DIR
)/include/GL
157 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
) ]; then \
158 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/libGL
* $(INSTALL_DIR
)/$(LIB_DIR
); \
160 @if
[ -e
$(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
) ]; then \
161 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/libOSMesa
* $(INSTALL_DIR
)/$(LIB_DIR
); \
163 @if
[ "${DRIVER_DIRS}" = "dri" ] ; then \
164 cd drivers
/dri
; $(MAKE
) install ; \
167 ## NOT INSTALLED YET:
168 ## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
169 ## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
174 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
179 -rm -f depend depend.bak libmesa.a
181 (cd drivers
/dri
; $(MAKE
) clean)
182 (cd x86
; $(MAKE
) clean)
183 (cd x86-64
; $(MAKE
) clean)