GNUmakefile.in 1.41 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

14
SUBDIRS         = lib event tools os sensors tmcc
15

Leigh B Stoller's avatar
Leigh B Stoller committed
16
ifeq ($(WITH_EMULAB),1)
17
all:	all-subdirs
18
install:all boss-install-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
19 20
else
all:	client-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
21 22 23 24
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
25
endif
26 27 28
include $(TESTBED_SRCDIR)/GNUmakerules

client:		client-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
29
client-install: client client-mkdirs client-install-subdirs
30
control-install: control-install-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
31 32
subboss:	subboss-subdirs
subboss-install: client subboss-install-subdirs
33
post-install:	post-install-subdirs
34 35
clean:		clean-subdirs
distclean:	distclean-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
36
mfs:		mfs-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
37
mfs-install:	client-mkdirs mfs-install-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
38
frisbee-mfs:	frisbee-mfs-subdirs
Leigh B Stoller's avatar
Leigh B Stoller committed
39 40 41 42 43
frisbee-mfs-install:	client-mkdirs frisbee-mfs-install-subdirs

client-mkdirs:
	-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
	-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)
44 45 46 47 48 49 50 51

# 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)