4 include $(TOP
)/configs
/current
11 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
14 $(CXX
) -c
$(INCLUDE_DIRS
) $(CXXFLAGS
) $< -o
$@
17 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
21 # Default: build dependencies, then asm_subdirs, GLSL built-in lib,
22 # then convenience libs (.a) and finally the device drivers:
23 default
: depend asm_subdirs glsl_builtin libmesa.a libmesagallium.a \
24 libglapi.a driver_subdirs
28 ######################################################################
29 # Helper libraries used by many drivers:
31 # Make archive of core mesa object files
32 libmesa.a
: $(MESA_OBJECTS
) $(GLSL_LIBS
)
33 @
$(MKLIB
) -o mesa
-static
$(MESA_OBJECTS
) $(GLSL_LIBS
)
35 # Make archive of subset of core mesa object files for gallium
36 libmesagallium.a
: $(MESA_GALLIUM_OBJECTS
) $(GLSL_LIBS
)
37 @
$(MKLIB
) -o mesagallium
-static
$(MESA_GALLIUM_OBJECTS
) $(GLSL_LIBS
)
39 # Make archive of gl* API dispatcher functions only
40 libglapi.a
: $(GLAPI_OBJECTS
)
41 @
$(MKLIB
) -o glapi
-static
$(GLAPI_OBJECTS
)
43 ######################################################################
45 driver_subdirs
: libmesa.a libglapi.a libmesagallium.a
46 @
(cd drivers
&& $(MAKE
))
49 ######################################################################
52 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_ASM
; then \
53 (cd x86
&& $(MAKE
)) || exit
1 ; \
55 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_64_ASM
; then \
56 (cd x86
&& $(MAKE
)) || exit
1 ; \
57 (cd x86-64
&& $(MAKE
)) || exit
1 ; \
61 ######################################################################
62 # GLSL built-in library
64 (cd shader
/slang
/library
&& $(MAKE
)) || exit
1 ;
67 ######################################################################
68 # Dependency generation
70 depend
: $(ALL_SOURCES
)
71 @ echo
"running $(MKDEP)"
73 @
$(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(ALL_SOURCES
) \
74 > /dev
/null
2>/dev
/null
77 ######################################################################
80 # this isn't fleshed out yet but is probably the way to go in the future
82 (cd drivers
&& $(MAKE
) install)
85 # XXX replace this with new_install above someday
87 @for driver in
$(DRIVER_DIRS
) ; do \
89 osmesa
) if
[ "$(DRIVER_DIRS)" = osmesa
]; then \
90 $(MAKE
) install-headers install-osmesa || exit
1 ; \
92 $(MAKE
) install-osmesa || exit
1 ; \
94 dri
) $(MAKE
) install-libgl install-dri || exit
1 ;; \
95 *) $(MAKE
) install-libgl || exit
1 ;; \
101 -e
's,@INSTALL_DIR@,$(INSTALL_DIR),' \
102 -e
's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
103 -e
's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
104 -e
's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
105 -e
's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \
106 -e
's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \
107 -e
's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \
108 -e
's,@GL_LIB@,$(GL_LIB),'
113 osmesa_pcedit
= sed \
114 -e
's,@INSTALL_DIR@,$(INSTALL_DIR),' \
115 -e
's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
116 -e
's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
117 -e
's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
118 -e
's,@OSMESA_LIB@,$(OSMESA_LIB),' \
119 -e
's,@OSMESA_PC_REQ@,$(OSMESA_PC_REQ),' \
120 -e
's,@OSMESA_PC_LIB_PRIV@,$(OSMESA_PC_LIB_PRIV),'
122 osmesa.
pc: osmesa.
pc.in
123 $(osmesa_pcedit
) $< > $@
126 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_INC_DIR
)/GL
127 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h \
128 $(DESTDIR
)$(INSTALL_INC_DIR
)/GL
130 install-libgl
: default gl.
pc install-headers
131 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)
132 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
133 $(MINSTALL
) $(TOP
)/$(LIB_DIR
)/$(GL_LIB_GLOB
) \
134 $(DESTDIR
)$(INSTALL_LIB_DIR
)
135 $(INSTALL
) -m
644 gl.
pc $(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
137 install-osmesa
: default osmesa.
pc
138 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)
139 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
140 $(MINSTALL
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_GLOB
) \
141 $(DESTDIR
)$(INSTALL_LIB_DIR
)
142 $(INSTALL
) -m
644 osmesa.
pc $(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
145 cd drivers
/dri
&& $(MAKE
) install
151 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
157 -rm -f depend depend.bak libmesa.a libglapi.a libmesagallium.a
160 -rm -f shader
/slang
/library
/*_gc.h
161 -@cd drivers
/dri
&& $(MAKE
) clean
162 -@cd drivers
/x11
&& $(MAKE
) clean
163 -@cd drivers
/osmesa
&& $(MAKE
) clean
164 -@cd x86
&& $(MAKE
) clean
165 -@cd x86-64
&& $(MAKE
) clean