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

include $(OBJDIR)/Makeconf

12
SUBDIRS	= slothd and
13

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

Kirk Webb's avatar
   
Kirk Webb committed
16
ifeq ($(SYSTEM),FreeBSD)
17
18
19
20
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)
21
ifeq ($(EVENTSYS),1) # Also, we have to have the event system enabled
Kirk Webb's avatar
   
Kirk Webb committed
22
23
SUBDIRS	+= canaryd
endif
24
endif
25
endif
26

Kirk Webb's avatar
   
Kirk Webb committed
27
###############################################################################
Kirk Webb's avatar
   
Kirk Webb committed
28

Kirk Webb's avatar
   
Kirk Webb committed
29
30
31
32
## `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
33

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

Kirk Webb's avatar
   
Kirk Webb committed
38
###############################################################################
39

Kirk Webb's avatar
   
Kirk Webb committed
40
41
42
43
44
## 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::
45

Kirk Webb's avatar
   
Kirk Webb committed
46
47
48
49
50
51
## 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))
52

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

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

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

Kirk Webb's avatar
   
Kirk Webb committed
71
###############################################################################
72

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

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

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

82
mfs-install: mfs slothd.client-install
Kirk Webb's avatar
   
Kirk Webb committed
83
84

.PHONY: mfs mfs-install