GNUmakefile.in 1.72 KB
Newer Older
1
2
3
4
5
6
#
# Insert Copyright Here.
#
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
7
SUBDIR		= sensors
8
9
10

include $(OBJDIR)/Makeconf

Kirk Webb's avatar
   
Kirk Webb committed
11
SUBDIRS	= slothd
12

Kirk Webb's avatar
   
Kirk Webb committed
13
SYSTEM            := $(shell uname -s)
14

Kirk Webb's avatar
   
Kirk Webb committed
15
16
17
ifeq ($(SYSTEM),FreeBSD)
SUBDIRS	+= canaryd
endif
18

Kirk Webb's avatar
   
Kirk Webb committed
19
###############################################################################
Kirk Webb's avatar
   
Kirk Webb committed
20

Kirk Webb's avatar
   
Kirk Webb committed
21
22
23
24
## `ACTIONS' is the set of actions that may be taken on a subdirectory or on
## the current directory.  These become phony targets.
##
ACTIONS = all install client client-install clean distclean
25

Kirk Webb's avatar
   
Kirk Webb committed
26
27
28
## `TARGETS' is the set of all `<subdir>.<action>' targets.
##
TARGETS = $(foreach action,$(ACTIONS),$(addsuffix .$(action),$(SUBDIRS)))
29

Kirk Webb's avatar
   
Kirk Webb committed
30
###############################################################################
31

Kirk Webb's avatar
   
Kirk Webb committed
32
33
34
35
36
## Explicitly mention `all' first, so that it will be the default target.  This
## must be a double colon rule; see the rule for `ACTIONS' below.
##
.PHONY: all
all::
37

Kirk Webb's avatar
   
Kirk Webb committed
38
39
40
41
42
43
## Rules for generic actions.  Each is made by applying the action to all of
## the subdirectories.  Note that these are defined as double-colon rules so
## that one can add extra statements in separate rules if necessary.
##
.PHONY: $(ACTIONS)
$(ACTIONS):: %: $(addsuffix .%,$(SUBDIRS))
44

Kirk Webb's avatar
   
Kirk Webb committed
45
46
47
48
49
## Rules for targets of the form `<subdir>.<action>'.
##
.PHONY: $(TARGETS)
$(TARGETS):
	@$(MAKE) -C $(basename $@) $(patsubst .%,%,$(suffix $@))
50

Kirk Webb's avatar
   
Kirk Webb committed
51
52
53
54
## Making a subdirectory is the same as making `<subdir>.<all>'.
##
.PHONY: $(SUBDIRS)
$(SUBDIRS): %: %.all
55

Kirk Webb's avatar
   
Kirk Webb committed
56
###############################################################################
57

Kirk Webb's avatar
   
Kirk Webb committed
58
59
60
61
62
63
64
65
66
67
68
69
## Any extra actions can be defined here, e.g.:
##
## clean::
##	$(RM) core

###############################################################################

mfs: client

mfs-install: client-install

.PHONY: mfs mfs-install