From fffadc219f3900a5b0405a9fddbc289873ea0842 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 20 Feb 2009 00:50:26 +0100 Subject: gallium: Improve recursive makefiles --- src/gallium/winsys/drm/Makefile | 32 +++----------------------------- src/gallium/winsys/drm/intel/Makefile | 21 +++------------------ src/gallium/winsys/drm/nouveau/Makefile | 19 +++---------------- 3 files changed, 9 insertions(+), 63 deletions(-) (limited to 'src/gallium/winsys/drm') diff --git a/src/gallium/winsys/drm/Makefile b/src/gallium/winsys/drm/Makefile index a84fcd8418..fee0191643 100644 --- a/src/gallium/winsys/drm/Makefile +++ b/src/gallium/winsys/drm/Makefile @@ -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: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (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: +default install clean: @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) clean) ; \ + (cd $$dir && $(MAKE) $@) || exit 1; \ fi \ done - -rm -f common/*.o diff --git a/src/gallium/winsys/drm/intel/Makefile b/src/gallium/winsys/drm/intel/Makefile index 78773b8d1b..d8feef6824 100644 --- a/src/gallium/winsys/drm/intel/Makefile +++ b/src/gallium/winsys/drm/intel/Makefile @@ -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: diff --git a/src/gallium/winsys/drm/nouveau/Makefile b/src/gallium/winsys/drm/nouveau/Makefile index b5735329ec..652cf7146c 100644 --- a/src/gallium/winsys/drm/nouveau/Makefile +++ b/src/gallium/winsys/drm/nouveau/Makefile @@ -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: -- cgit v1.2.3