Makefile.in 2.93 KB
Newer Older
1 2
## -*- mode: Makefile -*-
##
3
## Copyright (c) 2011, 2012, 2013, 2014 The University of Utah
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of
## the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

###############################################################################

21 22
SRCDIR		= @srcdir@
TOP_SRCDIR      = @top_srcdir@
David Johnson's avatar
David Johnson committed
23 24
SUBDIR		= 
OBJDIR		= @top_builddir@
25 26 27

include Makeconf

28
SUBDIRS = include lib dwdebug
29
ifeq ($(ENABLE_XENACCESS),"1")
30
	SUBDIRS += xenaccess xentt vmprobes # vmps vmfs vmtap
31
endif
32
ifeq ($(ENABLE_LIBVMI),"1")
33
	SUBDIRS += vmprobes
34
endif
35
SUBDIRS += target
36
ifeq ("@ENABLE_TESTS@","1")
37
SUBDIRS += tests
38
endif
39
SUBDIRS += tools
40 41 42 43
ifeq ("@ENABLE_ASM@","1")
SUBDIRS += asm/moti
endif

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

#
# We have to stagger the XML build, because stuff in analysis/ depends on 
# xml/schema if ENABLE_SOAP!
#
ifeq ("@ENABLE_SOAP@","1")
    SUBDIRS += xml/schema
endif
#
# This must follow the xml build, because it *can* make use of the
# soap-generated serializers/deserializers.
#
SUBDIRS += analysis
#
# Continue the XML SOAP build...
#
60 61 62
ifeq ("@ENABLE_SOAP@","1")
    SUBDIRS += xml
endif
63

64 65
.NOTPARALLEL:

66 67
all: all-subdirs 

68 69
include $(TOP_SRCDIR)/Makerules

70 71 72
install: install-local install-subdirs

install-local:
73 74
	@echo "Installing config.h"
	-mkdir -p $(INSTALL_INCDIR)
75
	$(INSTALL_DATA) $(OBJDIR)/config.h $(INSTALL_INCDIR)
76

77 78
test:
	make -C tests test
79

80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
# We use separate src and obj trees, so the traditional distclean to
# clean "made" files from a mingled source-and-obj tree is unnecessary.
# However, this may be useful if you mistakenly configure and make a src tree.
clean:		clean-subdirs

distclean:	distclean-subdirs
	rm -rf Makeconf Makefile config.status config.cache config.log autom4te.cache
	rm -f $(DISTCLEAN_FILES)
#
# Here's a different approch to recover from just configure problems.  It cleans
# all files from an obj tree that have a corresponding .in file in the src tree.
undo-configure:
	find $SRCDIR -name '*.in' -a -not -name configure.in | \
	    sed -e "s;$SRCDIR;$OBJDIR;" -e 's;[.]in$;;' | xargs rm -f

95 96 97 98 99 100 101 102 103 104 105
# How to recursively descend into subdirectories to make general
# targets such as `all'.
#
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))

%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;

# By default, make any target by descending into subdirectories.
%: %-subdirs ;

106 107 108 109
.PHONY: install

# Get rid of a bunch of nasty built-in implicit rules.
.SUFFIXES: