GNUmakefile.in 1.29 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
# EMULAB-COPYRIGHT
3
# Copyright (c) 2000-2011 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
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= event
11
ISMAINSITE      = @TBMAINSITE@
12
13
14

include $(OBJDIR)/Makeconf

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

17
SUBDIRS		= proxy example
18
ifeq ($(SYSTEM),FreeBSD)
19
20
FBSDREL	:= $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
FBSDMAJ := $(basename $(FBSDREL))
21
22
23
24
SUBDIRS	       += sched stated
ifeq ($(ISMAINSITE),1)
SUBDIRS        += new_sched
endif
25
endif
26

27
all:	etc-subdir all-subdirs
28
29
30

include $(TESTBED_SRCDIR)/GNUmakerules

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

34
install: 
35
	@$(MAKE) -C sched install
36
ifeq ($(ISMAINSITE),1)
37
	@$(MAKE) -C new_sched install
38
endif
39
	@$(MAKE) -C stated install
40
	@$(MAKE) -C proxy install
41

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

45
control-install: 
46
	@$(MAKE) -C sched control-install
47
ifeq ($(ISMAINSITE),1)
48
	@$(MAKE) -C new_sched control-install
49
endif
50
	@$(MAKE) -C proxy control-install
51

52
53
54
post-install: 
	@$(MAKE) -C linktest post-install

Mike Hibler's avatar
Mike Hibler committed
55
56
clean:		clean-subdirs
distclean:	distclean-subdirs
57

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

64
.PHONY:	$(SUBDIRS)