blob: 56837d86949d6dd97b482527071c6187708122d2 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001## Process this file with automake to produce Makefile.in.
2
David Lamparter237aac52014-06-28 22:23:10 +02003AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
David Lamparterc0bedeb2015-03-03 10:00:43 +01004AM_CFLAGS = $(WERROR)
paul718e3742002-12-13 20:15:29 +00005DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
6
gdt87efd642004-06-30 17:36:11 +00007lib_LTLIBRARIES = libzebra.la
Paul Jakmacec0c4f2006-03-30 13:58:05 +00008libzebra_la_LDFLAGS = -version-info 0:0:0
paul718e3742002-12-13 20:15:29 +00009
gdt87efd642004-06-30 17:36:11 +000010libzebra_la_SOURCES = \
hasso6590f2c2004-10-19 20:40:08 +000011 network.c pid_output.c getopt.c getopt1.c daemon.c \
12 checksum.c vector.c linklist.c vty.c command.c \
paul718e3742002-12-13 20:15:29 +000013 sockunion.c prefix.c thread.c if.c memory.c buffer.c table.c hash.c \
14 filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
Vincent Bernatd6be5fb2012-05-24 09:44:43 +020015 zclient.c sockopt.c smux.c agentx.c snmp.c md5.c if_rmap.c keychain.c privs.c \
paul354d1192005-04-25 16:26:42 +000016 sigevent.c pqueue.c jhash.c memtypes.c workqueue.c
paul2fd2fd52005-04-15 11:47:15 +000017
David Lamparter0be793e2012-11-27 01:34:56 +000018BUILT_SOURCES = memtypes.h route_types.h gitversion.h
paul718e3742002-12-13 20:15:29 +000019
gdt87efd642004-06-30 17:36:11 +000020libzebra_la_DEPENDENCIES = @LIB_REGEX@
paul718e3742002-12-13 20:15:29 +000021
David Lamparter8df55972013-03-01 12:03:58 +010022libzebra_la_LIBADD = @LIB_REGEX@ @LIBCAP@
paul718e3742002-12-13 20:15:29 +000023
gdtaf273652003-12-08 18:12:34 +000024pkginclude_HEADERS = \
paul34204aa2005-11-03 09:00:23 +000025 buffer.h checksum.h command.h filter.h getopt.h hash.h \
26 if.h linklist.h log.h \
paul718e3742002-12-13 20:15:29 +000027 memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
28 str.h stream.h table.h thread.h vector.h version.h vty.h zebra.h \
vincentc1a03d42005-09-28 15:47:44 +000029 plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
paul354d1192005-04-25 16:26:42 +000030 privs.h sigevent.h pqueue.h jhash.h zassert.h memtypes.h \
Dinesh Dutt8551e6d2013-10-22 17:42:18 -070031 workqueue.h route_types.h libospf.h
paul718e3742002-12-13 20:15:29 +000032
David Lamparter4209a882012-12-13 10:59:00 +010033EXTRA_DIST = \
34 regex.c regex-gnu.h \
35 queue.h \
36 memtypes.awk \
37 route_types.pl route_types.txt \
38 gitversion.pl
paul718e3742002-12-13 20:15:29 +000039
paulab59ae32005-04-25 13:52:26 +000040memtypes.h: $(srcdir)/memtypes.c $(srcdir)/memtypes.awk
Paul Jakma9c42a6e2006-06-27 07:52:03 +000041 ($(GAWK) -f $(srcdir)/memtypes.awk $(srcdir)/memtypes.c > $@)
42
David Lampartere0ca5fd2009-09-16 01:52:42 +020043route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
44 @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
David Lamparter0be793e2012-11-27 01:34:56 +000045
46if GIT_VERSION
47
48# bit of a trick here to always have up-to-date git stamps without triggering
49# unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
50# but if we use that on gitversion.h it'll ripple through the .c file deps.
51# (even if gitversion.h's file timestamp doesn't change, make will think it
52# did, because of .PHONY...)
53
54.PHONY: gitversion.h.tmp
55.SILENT: gitversion.h gitversion.h.tmp
56GITH=gitversion.h
57gitversion.h.tmp: $(srcdir)/../.git
58 @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
59gitversion.h: gitversion.h.tmp
60 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}
61
62else
63.PHONY: gitversion.h
64gitversion.h:
Hasso Tepper61be0ee2012-12-14 14:58:32 +020065 true
David Lamparter0be793e2012-11-27 01:34:56 +000066endif