Merge branch '7.8'
[mesa.git] / src / Makefile
1 # src/Makefile
2
3 TOP = ..
4
5 include $(TOP)/configs/current
6
7 SUBDIRS = $(SRC_DIRS)
8
9
10 default: message $(TOP)/$(LIB_DIR) subdirs
11
12
13 message:
14 @echo "Making sources for" $(CONFIG_NAME)
15
16
17 subdirs:
18 @for dir in $(SUBDIRS) ; do \
19 if [ -d $$dir ] ; then \
20 (cd $$dir && $(MAKE)) || exit 1; \
21 fi \
22 done
23
24 install: $(TOP)/$(LIB_DIR)
25 @for dir in $(SUBDIRS) ; do \
26 if [ -d $$dir ] ; then \
27 (cd $$dir && $(MAKE) install) || exit 1 ; \
28 fi \
29 done
30
31 $(TOP)/$(LIB_DIR):
32 -@test -d $(TOP)/$(LIB_DIR) || mkdir -p $(TOP)/$(LIB_DIR)
33
34
35 clean:
36 -@for dir in $(SUBDIRS) ; do \
37 if [ -d $$dir ] ; then \
38 (cd $$dir && $(MAKE) clean) ; \
39 fi \
40 done