GNUmakefile.in 1.24 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:	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
install: 
	@$(MAKE) -C lib install
	@$(MAKE) -C sched install
35
	@$(MAKE) -C tbgen install
36
	@$(MAKE) -C stated install
37
	@$(MAKE) -C linktest install
38

39
client:		trafgen-fetch client-subdirs
40
client-install: client client-install-subdirs
41

42
control-install: 
Leigh B. Stoller's avatar
Leigh B. Stoller committed
43
	@$(MAKE) -C lib control-install
44
45
	@$(MAKE) -C tbgen control-install

Mike Hibler's avatar
Mike Hibler committed
46
47
clean:		clean-subdirs
distclean:	distclean-subdirs
48

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

55
.PHONY:	$(SUBDIRS) trafgen-fetch