GNUmakefile.in 1.35 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2004 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
SUBDIRS		= lib tbgen trafgen program-agent proxy example linktest \
		  link-agent
18
ifeq ($(SYSTEM),FreeBSD)
19
SUBDIRS	       += sched delay-agent nsetrafgen stated
20
endif
21

22
all:	etc-subdir trafgen-fetch all-subdirs
23
24
25

include $(TESTBED_SRCDIR)/GNUmakerules

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

32
33
34
etc-subdir:
	@$(MAKE) -C etc all

35
36
37
install: 
	@$(MAKE) -C lib install
	@$(MAKE) -C sched install
38
	@$(MAKE) -C tbgen install
39
	@$(MAKE) -C stated install
40
	@$(MAKE) -C linktest install
41

42
client:		trafgen-fetch client-subdirs
43
client-install: client client-install-subdirs
44

45
control-install: 
Leigh B. Stoller's avatar
Leigh B. Stoller committed
46
	@$(MAKE) -C lib control-install
47
	@$(MAKE) -C tbgen control-install
48
49
	@$(MAKE) -C sched control-install
	@$(MAKE) -C linktest install
50

Mike Hibler's avatar
Mike Hibler committed
51
52
clean:		clean-subdirs
distclean:	distclean-subdirs
53

Mike Hibler's avatar
Mike Hibler committed
54
55
56
57
58
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;
59

60
.PHONY:	$(SUBDIRS) trafgen-fetch