1 2SUBDIRS:= libibcommon libibumad libibmad opensm infiniband-diags 3 4all: 5 6config: 7 $(foreach dir, $(SUBDIRS), \ 8 if [ ! -z "$(force)" -o ! -x $(dir)/configure ] ; then \ 9 ( cd $(dir) && ./autogen.sh && ./configure $(CONFIG_OPTS) ) \ 10 || exit 1 ; \ 11 elif [ ! -e $(dir)/Makefile ] ; then \ 12 ( cd $(dir) && ./configure $(CONFIG_OPTS) ) \ 13 || exit 1 ; \ 14 fi ; ) 15 16automake: force=1 17automake: config 18 19all install: config 20all install clean: 21 $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@ && ) echo $@ done 22