chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d966eb
)
server/Makefile.am: Build most of the server into a library.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 11 Jun 2018 15:34:10 +0000
(16:34 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 5 Sep 2019 12:07:21 +0000
(13:07 +0100)
As a bonus, we get to avoid having to mention most of the files twice to
build both the server proper and the test program.
server/Makefile.am
patch
|
blob
|
blame
|
history
diff --git
a/server/Makefile.am
b/server/Makefile.am
index 607de24c2b3a6d09b93c75c20c57893b8e5e5a36..96c78d3021443c79c476db5fd82722c577fa9195 100644
(file)
--- a/
server/Makefile.am
+++ b/
server/Makefile.am
@@
-25,6
+25,7
@@
include $(top_srcdir)/vars.am
sbin_PROGRAMS =
include $(top_srcdir)/vars.am
sbin_PROGRAMS =
+noinst_LIBRARIES =
noinst_PROGRAMS =
man_MANS =
noinst_PROGRAMS =
man_MANS =
@@
-34,31
+35,35
@@
LDADD = $(libcommon) $(libpriv) \
###--------------------------------------------------------------------------
### The main server.
###--------------------------------------------------------------------------
### The main server.
-sbin_PROGRAMS += tripe
-
-
tripe_SOURCES
=
+## Build a library, for special effects.
+noinst_LIBRARIES += libtripe.a
+
libtripe_a_SOURCES
=
## Main header file.
## Main header file.
-
tripe_SOURCES
+= tripe.h
+
libtripe_a_SOURCES
+= tripe.h
## Main sources.
## Main sources.
-tripe_SOURCES += servutil.c
-tripe_SOURCES += addrmap.c
-tripe_SOURCES += keymgmt.c
-tripe_SOURCES += bulkcrypto.c
-tripe_SOURCES += dh.c
-tripe_SOURCES += keyset.c
-tripe_SOURCES += keyexch.c
-tripe_SOURCES += chal.c
-tripe_SOURCES += peer.c
-tripe_SOURCES += privsep.c
-tripe_SOURCES += admin.c
-tripe_SOURCES += tripe.c
-tripe_SOURCES += standalone.c
+libtripe_a_SOURCES += servutil.c
+libtripe_a_SOURCES += addrmap.c
+libtripe_a_SOURCES += keymgmt.c
+libtripe_a_SOURCES += bulkcrypto.c
+libtripe_a_SOURCES += dh.c
+libtripe_a_SOURCES += keyset.c
+libtripe_a_SOURCES += keyexch.c
+libtripe_a_SOURCES += chal.c
+libtripe_a_SOURCES += peer.c
+libtripe_a_SOURCES += privsep.c
+libtripe_a_SOURCES += admin.c
+libtripe_a_SOURCES += tripe.c
## Tunnel drivers.
## Tunnel drivers.
-tripe_SOURCES += tun-std.c
-tripe_SOURCES += tun-slip.c
+libtripe_a_SOURCES += tun-std.c
+libtripe_a_SOURCES += tun-slip.c
+
+## The main server.
+sbin_PROGRAMS += tripe
+tripe_SOURCES = standalone.c
+tripe_LDADD = libtripe.a $(LDADD)
## Server manual page.
man_MANS += tripe.8tripe
## Server manual page.
man_MANS += tripe.8tripe
@@
-79,23
+84,7
@@
EXTRA_DIST += tripe-service.7.in
### Unit-test program.
noinst_PROGRAMS += tripe-test
### Unit-test program.
noinst_PROGRAMS += tripe-test
-
tripe_test_SOURCES = test.c
tripe_test_SOURCES = test.c
-
-tripe_test_SOURCES += admin.c
-tripe_test_SOURCES += addrmap.c
-tripe_test_SOURCES += bulkcrypto.c
-tripe_test_SOURCES += chal.c
-tripe_test_SOURCES += dh.c
-tripe_test_SOURCES += keyexch.c
-tripe_test_SOURCES += keymgmt.c
-tripe_test_SOURCES += keyset.c
-tripe_test_SOURCES += peer.c
-tripe_test_SOURCES += privsep.c
-tripe_test_SOURCES += servutil.c
-tripe_test_SOURCES += tripe.c
-
-tripe_test_SOURCES += tun-std.c
-tripe_test_SOURCES += tun-slip.c
+tripe_test_LDADD = libtripe.a $(LDADD)
###----- That's all, folks --------------------------------------------------
###----- That's all, folks --------------------------------------------------