GNUmakefile.in 1.79 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
4
# All rights reserved.
5
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
6

7 8 9 10 11 12 13
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= event

include $(OBJDIR)/Makeconf

14 15
SYSTEM	       := $(shell uname -s)

Mike Hibler's avatar
Mike Hibler committed
16 17 18 19
SUBDIRS		= lib tbgen program-agent proxy example linktest link-agent
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
SUBDIRS	       += trafgen
endif
20
ifeq ($(SYSTEM),FreeBSD)
21 22 23 24 25 26 27 28
FBSDREL	:= $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
FBSDMAJ := $(basename $(FBSDREL))
SUBDIRS	       += sched stated
ifneq ($(FBSDMAJ),8)
# doesn't build right now due to API changes
SUBDIRS	       += delay-agent
endif

29
endif
30

31
all:	etc-subdir trafgen-fetch all-subdirs
32 33 34

include $(TESTBED_SRCDIR)/GNUmakerules

35 36 37
# XXX Yeah, this doesn't belong here but I can't make the trafgen
# makefile work if it unpacks the tarball itself
#
Mike Hibler's avatar
Mike Hibler committed
38
trafgen-fetch:
39
	$(SRCDIR)/trafgen/tg-install $(SRCDIR)/trafgen "@OUTERBOSS_NODENAME@"
40

41 42 43
etc-subdir:
	@$(MAKE) -C etc all

44 45
install: 
	@$(MAKE) -C lib install
46
	@$(MAKE) -C sched install
47
	@$(MAKE) -C tbgen install
48
	@$(MAKE) -C stated install
49
	@$(MAKE) -C linktest install
50
	@$(MAKE) -C program-agent install
51
	@$(MAKE) -C proxy install
52

53
client:		trafgen-fetch client-subdirs
54
client-install: client client-install-subdirs
55

56
control-install: 
Leigh B. Stoller's avatar
Leigh B. Stoller committed
57
	@$(MAKE) -C lib control-install
58
	@$(MAKE) -C tbgen control-install
59
	@$(MAKE) -C sched control-install
60
	@$(MAKE) -C linktest control-install
61
	@$(MAKE) -C program-agent control-install
62
	@$(MAKE) -C proxy control-install
63

64 65 66
post-install: 
	@$(MAKE) -C linktest post-install

Mike Hibler's avatar
Mike Hibler committed
67 68
clean:		clean-subdirs
distclean:	distclean-subdirs
69

Mike Hibler's avatar
Mike Hibler committed
70 71 72 73 74
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
75

76
.PHONY:	$(SUBDIRS) trafgen-fetch