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
$@
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 @
$(MKLIB
) -o mesa
-static
$(MESA_OBJECTS
)
35 # Make archive of gl* API dispatcher functions only
36 libglapi.a
: $(GLAPI_OBJECTS
)
37 @
$(MKLIB
) -o glapi
-static
$(GLAPI_OBJECTS
)
39 # Make archive of gl* API dispatcher functions only
40 $(GLAPI_LIB
): $(GLAPI_OBJECTS
)
41 @if
[ "${WINDOW_SYSTEM}" = "dri" ] ; then \
44 $(TOP
)/bin
/mklib
-o glapi
-static
$(GLAPI_OBJECTS
) ; \
47 ######################################################################
49 driver_subdirs
: libmesa.a libglapi.a
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,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
101 -e
's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
102 -e
's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
103 -e
's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \
104 -e
's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \
105 -e
's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),'
110 osmesa_pcedit
= sed \
111 -e
's,@INSTALL_DIR@,$(INSTALL_DIR),' \
112 -e
's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
113 -e
's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
114 -e
's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
115 -e
's,@OSMESA_LIB@,$(OSMESA_LIB),' \
116 -e
's,@OSMESA_PC_REQ@,$(OSMESA_PC_REQ),' \
117 -e
's,@OSMESA_PC_LIB_PRIV@,$(OSMESA_PC_LIB_PRIV),'
119 osmesa.
pc: osmesa.
pc.in
120 $(osmesa_pcedit
) $< > $@
123 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_INC_DIR
)/GL
124 $(INSTALL
) -m
644 $(TOP
)/include/GL
/*.h \
125 $(DESTDIR
)$(INSTALL_INC_DIR
)/GL
127 install-libgl
: default gl.
pc install-headers
128 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)
129 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
130 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(GL_LIB_GLOB
) \
131 $(DESTDIR
)$(INSTALL_LIB_DIR
)
132 $(INSTALL
) -m
644 gl.
pc $(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
134 install-osmesa
: default osmesa.
pc
135 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)
136 $(INSTALL
) -d
$(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
137 $(INSTALL
) $(TOP
)/$(LIB_DIR
)/$(OSMESA_LIB_GLOB
) \
138 $(DESTDIR
)$(INSTALL_LIB_DIR
)
139 $(INSTALL
) -m
644 osmesa.
pc $(DESTDIR
)$(INSTALL_LIB_DIR
)/pkgconfig
142 cd drivers
/dri
&& $(MAKE
) install
148 etags
`find . -name \*.[ch]` $(TOP
)/include/GL
/*.h
154 -rm -f depend depend.bak libmesa.a libglapi.a
157 -@cd drivers
/dri
&& $(MAKE
) clean
158 -@cd drivers
/x11
&& $(MAKE
) clean
159 -@cd drivers
/osmesa
&& $(MAKE
) clean
160 -@cd x86
&& $(MAKE
) clean
161 -@cd x86-64
&& $(MAKE
) clean