gallium: Improve recursive makefiles

This commit is contained in:
Jakob Bornecrantz 2009-02-20 00:50:26 +01:00
parent 3eebd24cb6
commit fffadc219f
7 changed files with 21 additions and 117 deletions

View File

@ -1,26 +1,12 @@
# src/gallium/Makefile
TOP = ../..
include $(TOP)/configs/current
SUBDIRS = $(GALLIUM_DIRS)
# Note winsys/ needs to be built after src/mesa
default: subdirs
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
clean:
rm -f `find . -name \*.[oa]`
rm -f `find . -name depend`
# Dummy install target
install:

View File

@ -1,20 +1,12 @@
# src/gallium/auxiliary/Makefile
TOP = ../../..
include $(TOP)/configs/current
SUBDIRS = $(GALLIUM_AUXILIARY_DIRS)
default: subdirs
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
clean:
rm -f `find . -name \*.[oa]`

View File

@ -1,20 +1,12 @@
# src/gallium/drivers/Makefile
TOP = ../../..
include $(TOP)/configs/current
SUBDIRS = $(GALLIUM_DRIVER_DIRS)
default: subdirs
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
clean:
rm -f `find . -name \*.[oa]`

View File

@ -1,24 +1,12 @@
# src/gallium/winsys/Makefile
TOP = ../../..
include $(TOP)/configs/current
SUBDIRS = $(GALLIUM_WINSYS_DIRS)
default: subdirs
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
clean:
rm -f `find . -name \*.[oa]`
# Dummy install target
install:

View File

@ -1,38 +1,12 @@
# src/gallium/winsys/drm/Makefile
# src/gallium/winsys/Makefile
TOP = ../../../..
include $(TOP)/configs/current
SUBDIRS = $(GALLIUM_WINSYS_DRM_DIRS)
default: $(TOP)/$(LIB_DIR)/gallium subdirs
$(TOP)/$(LIB_DIR)/gallium:
-mkdir -p $(TOP)/$(LIB_DIR)/gallium
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
install:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) install) || exit 1 ; \
fi \
done
clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \
done
-rm -f common/*.o

View File

@ -1,27 +1,12 @@
# src/gallium/winsys/drm/intel/Makefile
TOP = ../../../../..
include $(TOP)/configs/current
# Always build gem and then build winsys with
# enabled state trackers
SUBDIRS = gem $(GALLIUM_STATE_TRACKERS_DIRS)
default: subdirs
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
clean:
rm -f `find . -name \*.[oa]`
rm -f `find . -name depend`
# Dummy install target
install:

View File

@ -1,25 +1,12 @@
# src/gallium/winsys/drm/nouveau/Makefile
TOP = ../../../../..
include $(TOP)/configs/current
SUBDIRS = common dri
default: subdirs
subdirs:
default install clean:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
(cd $$dir && $(MAKE) $@) || exit 1; \
fi \
done
clean:
rm -f `find . -name \*.[oa]`
rm -f `find . -name depend`
# Dummy install target
install: