4 include $(TOP
)/configs
/current
12 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
15 $(CXX
) -c
$(INCLUDE_DIRS
) $(CXXFLAGS
) $< -o
$@
18 $(CC
) -c
$(INCLUDE_DIRS
) $(CFLAGS
) $< -o
$@
22 GLAPI_LIB
= libglapi.a
25 # Default: build dependencies, then asm_subdirs, then convenience
26 # libs (.a) and finally the device drivers:
27 default
: depend asm_subdirs libmesa.a
$(GLAPI_LIB
) driver_subdirs
31 ######################################################################
32 # Helper libraries used by many drivers:
34 # Make archive of core mesa object files
35 libmesa.a
: $(MESA_OBJECTS
) asm_subdirs
36 @
$(TOP
)/bin
/mklib
-o mesa
-static
$(MESA_OBJECTS
)
38 # Make archive of gl* API dispatcher functions only
39 $(GLAPI_LIB
): $(GLAPI_OBJECTS
) asm_subdirs
40 @if
[ "${WINDOW_SYSTEM}" = "dri" ] ; then \
43 $(TOP
)/bin
/mklib
-o glapi
-static
$(GLAPI_OBJECTS
) ; \
47 ######################################################################
49 driver_subdirs
: libmesa.a
$(GLAPI_LIB
)
50 (cd drivers
&& $(MAKE
))
53 ######################################################################
56 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_ASM
; then \
57 (cd x86
&& $(MAKE
)) || exit
1 ; \
59 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_64_ASM
; then \
60 (cd x86
&& $(MAKE
)) || exit
1 ; \
61 (cd x86-64
&& $(MAKE
)) || exit
1 ; \
65 ######################################################################
66 # Dependency generation
68 depend
: $(ALL_SOURCES
)
69 @ echo
"running $(MKDEP)"
71 @
$(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(ALL_SOURCES
) \
72 > /dev
/null
2>/dev
/null
75 ######################################################################
78 # this isn't fleshed out yet but is probably the way to go in the future
80 (cd drivers
&& $(MAKE
) install)
83 # XXX replace this with new_install above someday
85 @for driver in
$(DRIVER_DIRS
) ; do \
87 osmesa
) if
[ "$(DRIVER_DIRS)" = osmesa
]; then \
88 $(MAKE
) install-headers install-osmesa || exit
1 ; \
90 $(MAKE
) install-osmesa || exit
1 ; \
92 dri
) $(MAKE
) install-libgl install-dri || exit
1 ;; \
93 *) $(MAKE
) install-libgl || exit
1 ;; \
99 -e
's,@INSTALL_DIR@,$(INSTALL_DIR),' \
100 -e
's,@LIB_DIR@,$(LIB_DIR),' \
101 -e
's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),'
107 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/include/GL
108 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h \
109 $(DESTDIR
)$(INSTALL_DIR
)/include/GL
111 install-libgl
: default gl.
pc install-headers
112 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
113 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)/pkgconfig
114 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
)* \
115 $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
116 $(INSTALL
) -m
644 gl.
pc $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)/pkgconfig
118 install-osmesa
: default
119 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
120 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
)* \
121 $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
124 cd drivers
/dri
&& $(MAKE
) install
130 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
136 -rm -f depend depend.bak libmesa.a
$(GLAPI_LIB
)
138 -@cd drivers
/dri
&& $(MAKE
) clean
139 -@cd drivers
/xorg
&& $(MAKE
) clean
140 -@cd drivers
/x11
&& $(MAKE
) clean
141 -@cd drivers
/osmesa
&& $(MAKE
) clean
142 -@cd x86
&& $(MAKE
) clean
143 -@cd x86-64
&& $(MAKE
) clean