summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: bf439aea277c4e87d433da5258fe8428dd88e2b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# $Id$

# This file is part of ifplugd.
#
# ifplugd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# ifplugd is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ifplugd; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

AM_CFLAGS = $(LIBDAEMON_CFLAGS) -DSYSCONFDIR="\"$(sysconfdir)\""
LDADD = $(LIBDAEMON_LIBS)

sbin_PROGRAMS = ifplugd ifstatus

ifplugd_SOURCES = ifplugd.c \
			interface.c interface.h \
			ethtool-kernel.h ethtool-local.h \
			wireless.h wireless.15.h wireless.16.h \
			ifmonitor.h ifmonitor.c \
			nlapi.h nlapi.c \
			svn-revision.h

ifstatus_SOURCES = ifstatus.c \
			interface.c interface.h \
			ethtool-kernel.h ethtool-local.h \
			wireless.h wireless.15.h wireless.16.h \
			svn-revision.h

MAINTAINERCLEANFILES =
BUILT_SOURCES =

if USE_SUBVERSION
MAINTAINERCLEANFILES += svn-revision.h
BUILT_SOURCES += svn-revision.h
endif

ifstatus.$(OBJEXT): svn-revision.h
ifplugd.$(OBJEXT): svn-revision.h

if USE_SUBVERSION
svn-revision.h: Makefile
	if test -d "$(top_srcdir)/.svn" ; then \
		if REV=`svn info "$(top_srcdir)" | grep ^Revision | cut -f2 -d" "` 2> /dev/null ; then \
			echo -e "#ifndef foosvnrevisionhfoo\n#define foosvnrevisionhfoo\n#define SVN_REVISION \"$$REV\"\n#endif" > $@ ; \
	    fi \
	fi

svnkeywords:
	rm -f svn-revision.h
	svn propset svn:keywords Id *.c *.h Makefile.am

.PHONY: svnkeywords
endif