GNUmakefile.in 1.9 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
12

13
SYSTEM            := $(shell uname -s)
14

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)
20 21
SUBDIRS	+= canaryd
endif
22
endif
23

24
###############################################################################
25

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

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

35
###############################################################################
36

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

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

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

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 68 69
## Any extra actions can be defined here, e.g.:
##
## clean::
##	$(RM) core

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

70
mfs: slothd.client
71

72
mfs-install: mfs slothd.client-install
73 74

.PHONY: mfs mfs-install