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, then convenience
22 # libs (.a) and finally the device drivers:
23 default
: depend asm_subdirs libmesa.a libglapi.a driver_subdirs
26 # Default: build dependencies, then asm_subdirs, then convenience
27 # libs (.a) and finally the device drivers:
28 default
: depend asm_subdirs libmesa.a
$(GLAPI_LIB
) driver_subdirs
30 ######################################################################
31 # Helper libraries used by many drivers:
33 # Make archive of core mesa object files
34 libmesa.a
: $(MESA_OBJECTS
)
35 @
$(MKLIB
) -o mesa
-static
$(MESA_OBJECTS
)
37 # Make archive of gl* API dispatcher functions only
38 libglapi.a
: $(GLAPI_OBJECTS
)
39 @
$(MKLIB
) -o glapi
-static
$(GLAPI_OBJECTS
)
41 # Make archive of gl* API dispatcher functions only
42 $(GLAPI_LIB
): $(GLAPI_OBJECTS
)
43 @if
[ "${WINDOW_SYSTEM}" = "dri" ] ; then \
46 $(TOP
)/bin
/mklib
-o glapi
-static
$(GLAPI_OBJECTS
) ; \
49 ######################################################################
51 driver_subdirs
: libmesa.a libglapi.a
52 (cd drivers
&& $(MAKE
))
55 ######################################################################
58 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_ASM
; then \
59 (cd x86
&& $(MAKE
)) || exit
1 ; \
61 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_64_ASM
; then \
62 (cd x86
&& $(MAKE
)) || exit
1 ; \
63 (cd x86-64
&& $(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),'
110 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_INC_DIR
)/GL
111 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h \
112 $(DESTDIR
)$(INSTALL_INC_DIR
)/GL
114 install-libgl
: default gl.
pc install-headers
115 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)
116 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
117 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(GL_LIB_GLOB
) \
118 $(DESTDIR
)$(INSTALL_LIB_DIR
)
119 $(INSTALL
) -m
644 gl.
pc $(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
121 install-osmesa
: default
122 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)
123 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_GLOB
) \
124 $(DESTDIR
)$(INSTALL_LIB_DIR
)
127 cd drivers
/dri
&& $(MAKE
) install
133 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
139 -rm -f depend depend.bak libmesa.a libglapi.a
142 -@cd drivers
/dri
&& $(MAKE
) clean
143 -@cd drivers
/x11
&& $(MAKE
) clean
144 -@cd drivers
/osmesa
&& $(MAKE
) clean
145 -@cd x86
&& $(MAKE
) clean
146 -@cd x86-64
&& $(MAKE
) clean