GNUmakefile.in 1.52 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2007 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)

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
SUBDIRS	       += sched delay-agent stated
22
endif
23

24
all:	etc-subdir trafgen-fetch all-subdirs
25 26 27

include $(TESTBED_SRCDIR)/GNUmakerules

28 29 30
# 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
31
trafgen-fetch:
32
	$(SRCDIR)/trafgen/tg-install $(SRCDIR)/trafgen
33

34 35 36
etc-subdir:
	@$(MAKE) -C etc all

37 38
install: 
	@$(MAKE) -C lib install
39
	@$(MAKE) -C sched install
40
	@$(MAKE) -C tbgen install
41
	@$(MAKE) -C stated install
42
	@$(MAKE) -C linktest install
43
	@$(MAKE) -C program-agent install
44

45
client:		trafgen-fetch client-subdirs
46
client-install: client client-install-subdirs
47

48
control-install: 
Leigh B. Stoller's avatar
Leigh B. Stoller committed
49
	@$(MAKE) -C lib control-install
50
	@$(MAKE) -C tbgen control-install
51
	@$(MAKE) -C sched control-install
52
	@$(MAKE) -C linktest control-install
53
	@$(MAKE) -C program-agent control-install
54

55 56 57
post-install: 
	@$(MAKE) -C linktest post-install

Mike Hibler's avatar
Mike Hibler committed
58 59
clean:		clean-subdirs
distclean:	distclean-subdirs
60

Mike Hibler's avatar
Mike Hibler committed
61 62 63 64 65
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
66

67
.PHONY:	$(SUBDIRS) trafgen-fetch