GNUmakefile.in 1.64 KB
Newer Older
1 2 3 4 5 6 7 8
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= @top_builddir@
9
SUBDIR		= $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
10 11 12 13
SYSTEM	       := $(shell uname -s)

include $(OBJDIR)/Makeconf

Leigh B Stoller's avatar
Leigh B Stoller committed
14
SUBDIRS         =
Leigh B Stoller's avatar
Leigh B Stoller committed
15
ifeq ($(WITH_EMULAB),0)
Leigh B Stoller's avatar
Leigh B Stoller committed
16 17 18 19 20 21
#
# lib is a common directory, and is added to the clientside tarball.
# So not do not build it when building full emulab tree; already done.
#
SUBDIRS	       += lib
endif
Leigh B Stoller's avatar
Leigh B Stoller committed
22
# These must be after lib.
23
SUBDIRS	       += event tools os sensors tmcc
24

Leigh B Stoller's avatar
Leigh B Stoller committed
25
ifeq ($(WITH_EMULAB),1)
26
all:	all-subdirs
27
install:all boss-install-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
28 29
else
all:	client-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
30 31 32 33
install:
	@echo "Choose an appropriate install target, and make sure you "
	@echo "you are on a node of that type. Basically, do not do a "
	@echo "client-install on boss, cause you will be hating life!"
Leigh B Stoller's avatar
Leigh B Stoller committed
34
endif
35 36 37
include $(TESTBED_SRCDIR)/GNUmakerules

client:		client-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
38
client-install: client client-mkdirs client-install-subdirs
39
control-install: control-install-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
40 41
subboss:	subboss-subdirs
subboss-install: client subboss-install-subdirs
42
post-install:	post-install-subdirs
43 44
clean:		clean-subdirs
distclean:	distclean-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
45
mfs:		mfs-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
46
mfs-install:	client-mkdirs mfs-install-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
47
frisbee-mfs:	frisbee-mfs-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
48 49 50 51 52
frisbee-mfs-install:	client-mkdirs frisbee-mfs-install-subdirs

client-mkdirs:
	-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
	-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)
53 54 55 56 57 58 59 60

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

.PHONY:	$(SUBDIRS)