GNUmakefile.in 2.19 KB
Newer Older
1
#
2
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# 
# {{{EMULAB-LICENSE
# 
# This file is part of the Emulab network testbed software.
# 
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
# 
# This file 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 Affero General Public
# License for more details.
# 
# You should have received a copy of the GNU Affero General Public License
# along with this file.  If not, see <http://www.gnu.org/licenses/>.
# 
# }}}
22 23 24 25
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= @top_builddir@
26
SUBDIR		= $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
27
SYSTEM	       := $(shell uname -s)
28 29 30

include $(OBJDIR)/Makeconf

31
SUBDIRS		= program-agent link-agent tevc proxy linktest
32 33 34
ifeq ($(SYSTEM),Linux)
SUBDIRS        += disk-agent
endif
35 36 37
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
SUBDIRS	       += trafgen
endif
38 39
ifeq ($(WITH_EMULAB),1)
# only in a full build for now.
40 41 42
ifeq ($(SYSTEM),FreeBSD)
FBSDREL	:= $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
FBSDMAJ := $(basename $(FBSDREL))
43
ifneq ($(FBSDMAJ),8)
44
ifneq ($(FBSDMAJ),9)
45
ifneq ($(FBSDMAJ),10)
46 47 48 49
# doesn't build right now due to API changes
SUBDIRS	       += delay-agent
endif
endif
Cody Cutler's avatar
Cody Cutler committed
50
endif
51
endif
52
endif
53

54
all:	all-subdirs
55 56 57

include $(TESTBED_SRCDIR)/GNUmakerules

58 59 60 61 62
subboss: client
subboss-install:
	@$(MAKE) -C program-agent client-install
	@$(MAKE) -C proxy client-install

63
boss-install:   boss-install-subdirs
64
client:		client-subdirs
65
client-install: client client-install-subdirs
66
control-install: control-install-subdirs
67
fs-install:
68
post-install:	post-install-subdirs
69 70
clean:		clean-subdirs
distclean:	distclean-subdirs
Leigh Stoller's avatar
Leigh Stoller committed
71 72 73 74
mfs:
mfs-install:
frisbee-mfs:
frisbee-mfs-install:
75 76
newnode-mfs:
newnode-mfs-install:
77 78 79 80 81 82 83

# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;

84
.PHONY:	$(SUBDIRS)