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 # Default: build dependencies, then asm_subdirs, then convenience
23 # libs (.a) and finally the device drivers:
24 default
: depend asm_subdirs libmesa.a 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
)
33 @
$(TOP
)/bin
/mklib
-o mesa
-static
$(MESA_OBJECTS
)
35 # Make archive of gl* API dispatcher functions only
36 libglapi.a
: $(GLAPI_OBJECTS
)
37 @
$(TOP
)/bin
/mklib
-o glapi
-static
$(GLAPI_OBJECTS
)
40 ######################################################################
43 (cd drivers
&& $(MAKE
))
46 ######################################################################
49 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_ASM
; then \
50 (cd x86
&& $(MAKE
)) || exit
1 ; \
52 @ if echo
"$(ASM_FLAGS)" | grep
-q USE_X86_64_ASM
; then \
53 (cd x86
&& $(MAKE
)) || exit
1 ; \
54 (cd x86-64
&& $(MAKE
)) || exit
1 ; \
58 ######################################################################
59 # Dependency generation
61 depend
: $(ALL_SOURCES
)
62 @ echo
"running $(MKDEP)"
64 @
$(MKDEP
) $(MKDEP_OPTIONS
) $(DEFINES
) $(INCLUDE_DIRS
) $(ALL_SOURCES
) \
65 > /dev
/null
2>/dev
/null
68 ######################################################################
71 # this isn't fleshed out yet but is probably the way to go in the future
73 (cd drivers
&& $(MAKE
) install)
76 # XXX replace this with new_install above someday
78 @for driver in
$(DRIVER_DIRS
) ; do \
80 osmesa
) if
[ "$(DRIVER_DIRS)" = osmesa
]; then \
81 $(MAKE
) install-headers install-osmesa || exit
1 ; \
83 $(MAKE
) install-osmesa || exit
1 ; \
85 dri
) $(MAKE
) install-libgl install-dri || exit
1 ;; \
86 *) $(MAKE
) install-libgl || exit
1 ;; \
92 -e
's,@INSTALL_DIR@,$(INSTALL_DIR),' \
93 -e
's,@LIB_DIR@,$(LIB_DIR),' \
94 -e
's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),'
100 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/include/GL
101 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h \
102 $(DESTDIR
)$(INSTALL_DIR
)/include/GL
104 install-libgl
: default gl.
pc install-headers
105 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
106 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)/pkgconfig
107 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(GL_LIB_NAME
)* \
108 $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
109 $(INSTALL
) -m
644 gl.
pc $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)/pkgconfig
111 install-osmesa
: default
112 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
113 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_NAME
)* \
114 $(DESTDIR
)$(INSTALL_DIR
)/$(LIB_DIR
)
117 cd drivers
/dri
&& $(MAKE
) install
123 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
129 -rm -f depend depend.bak libmesa.a libglapi.a
131 -@cd drivers
/dri
&& $(MAKE
) clean
132 -@cd drivers
/xorg
&& $(MAKE
) clean
133 -@cd drivers
/x11
&& $(MAKE
) clean
134 -@cd drivers
/osmesa
&& $(MAKE
) clean
135 -@cd x86
&& $(MAKE
) clean
136 -@cd x86-64
&& $(MAKE
) clean