GNUmakefile.in 2.04 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

11
SUBDIRS	= slothd and
12

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

Kirk Webb's avatar
   
Kirk Webb committed
15
ifeq ($(SYSTEM),FreeBSD)
16
17
18
19
FBSDVERSION   := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')

# XXX not on FreeBSD 5 til I get a chance to fix it
ifneq ($(FBSDVERSION),FreeBSD5)
Kirk Webb's avatar
   
Kirk Webb committed
20
21
SUBDIRS	+= canaryd
endif
22
endif
23

Kirk Webb's avatar
   
Kirk Webb committed
24
###############################################################################
Kirk Webb's avatar
   
Kirk Webb committed
25

Kirk Webb's avatar
   
Kirk Webb committed
26
27
28
29
## `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
30

Kirk Webb's avatar
   
Kirk Webb committed
31
32
33
## `TARGETS' is the set of all `<subdir>.<action>' targets.
##
TARGETS = $(foreach action,$(ACTIONS),$(addsuffix .$(action),$(SUBDIRS)))
34

Kirk Webb's avatar
   
Kirk Webb committed
35
###############################################################################
36

Kirk Webb's avatar
   
Kirk Webb committed
37
38
39
40
41
## 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::
42

Kirk Webb's avatar
   
Kirk Webb committed
43
44
45
46
47
48
## 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))
49

Kirk Webb's avatar
   
Kirk Webb committed
50
51
52
53
54
## Rules for targets of the form `<subdir>.<action>'.
##
.PHONY: $(TARGETS)
$(TARGETS):
	@$(MAKE) -C $(basename $@) $(patsubst .%,%,$(suffix $@))
55

Kirk Webb's avatar
   
Kirk Webb committed
56
57
58
59
## Making a subdirectory is the same as making `<subdir>.<all>'.
##
.PHONY: $(SUBDIRS)
$(SUBDIRS): %: %.all
60

61
62
63
64
65
66
67
#
# Rules to regen configure written files.
#
%: %.in
	@echo "Regenerating $@"
	cd $(OBJDIR) && CONFIG_FILES=$(SUBDIR)/$@ ./config.status

Kirk Webb's avatar
   
Kirk Webb committed
68
###############################################################################
69

Kirk Webb's avatar
   
Kirk Webb committed
70
71
72
73
74
75
76
## Any extra actions can be defined here, e.g.:
##
## clean::
##	$(RM) core

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

77
mfs: slothd.client
Kirk Webb's avatar
   
Kirk Webb committed
78

79
mfs-install: mfs slothd.client-install
Kirk Webb's avatar
   
Kirk Webb committed
80
81

.PHONY: mfs mfs-install