Commit a26c7a4e authored by Dafydd Harries's avatar Dafydd Harries

factor out common link flags in makefiles

darcs-hash:20070123173026-c9803-f01c2f11d4fe4c6a60e777b4db2e59fd5499a8f7.gz
parent 32ea0465
...@@ -4,6 +4,8 @@ AM_CFLAGS = -Wall -Werror \ ...@@ -4,6 +4,8 @@ AM_CFLAGS = -Wall -Werror \
-I $(top_srcdir)/stun \ -I $(top_srcdir)/stun \
$(GLIB_CFLAGS) $(GLIB_CFLAGS)
COMMON_LDADD = libagent.la $(GLIB_LIBS)
noinst_LTLIBRARIES = libagent.la noinst_LTLIBRARIES = libagent.la
libagent_la_SOURCES = \ libagent_la_SOURCES = \
...@@ -24,6 +26,8 @@ check_PROGRAMS = \ ...@@ -24,6 +26,8 @@ check_PROGRAMS = \
test-recv \ test-recv \
test-stun test-stun
TESTS = $(check_PROGRAMS)
test_LDADD = libagent.la $(GLIB_LIBS) test_LDADD = libagent.la $(GLIB_LIBS)
test_readline_SOURCES = test-readline.c readline.h readline.c test_readline_SOURCES = test-readline.c readline.h readline.c
...@@ -32,15 +36,13 @@ test_readline_LDADD = $(GLIB_LIBS) ...@@ -32,15 +36,13 @@ test_readline_LDADD = $(GLIB_LIBS)
test_util_SOURCES = test-util.c util.h util.c test_util_SOURCES = test-util.c util.h util.c
test_util_LDADD = libagent.la $(GLIB_LIBS) test_util_LDADD = $(COMMON_LDADD)
test_add_stream_LDADD = libagent.la $(GLIB_LIBS) test_add_stream_LDADD = $(COMMON_LDADD)
test_recv_LDADD = libagent.la $(GLIB_LIBS) test_recv_LDADD = $(COMMON_LDADD)
test_stun_LDADD = libagent.la $(GLIB_LIBS) test_stun_LDADD = $(COMMON_LDADD)
TESTS = $(check_PROGRAMS)
pkginclude_HEADERS = agent.h pkginclude_HEADERS = agent.h
AM_CFLAGS = -Wall -Werror $(GLIB_CFLAGS) AM_CFLAGS = -Wall -Werror $(GLIB_CFLAGS)
COMMON_LDADD = libstun.la $(GLIB_LIBS)
noinst_LTLIBRARIES = libstun.la noinst_LTLIBRARIES = libstun.la
libstun_la_SOURCES = stun.h stun.c libstun_la_SOURCES = stun.h stun.c
noinst_PROGRAMS = stun-client stun-server noinst_PROGRAMS = stun-client stun-server
stun_client_LDADD = libstun.la $(GLIB_LIBS) stun_client_LDADD = $(COMMON_LDADD)
stun_server_LDADD = libstun.la $(GLIB_LIBS) stun_server_LDADD = $(COMMON_LDADD)
check_PROGRAMS = test check_PROGRAMS = test
test_LDADD = libstun.la $(GLIB_LIBS) $(CHECK_LIBS) TESTS = $(check_PROGRAMS)
TESTS = test test_LDADD = $(CHECK_LIBS) $(COMMON_LDADD)
AM_CFLAGS = -Wall -Werror $(GLIB_CFLAGS) AM_CFLAGS = -Wall -Werror $(GLIB_CFLAGS)
COMMON_LDADD = libudp.la $(GLIB_LIBS)
noinst_LTLIBRARIES = libudp.la noinst_LTLIBRARIES = libudp.la
libudp_la_SOURCES = \ libudp_la_SOURCES = \
...@@ -12,13 +14,13 @@ libudp_la_SOURCES = \ ...@@ -12,13 +14,13 @@ libudp_la_SOURCES = \
noinst_PROGRAMS = udp-client udp-echo-server noinst_PROGRAMS = udp-client udp-echo-server
udp_client_LDADD = libudp.la $(GLIB_LIBS) udp_client_LDADD = $(COMMON_LDADD)
udp_echo_server_LDADD = libudp.la $(GLIB_LIBS) udp_echo_server_LDADD = $(COMMON_LDADD)
check_PROGRAMS = test check_PROGRAMS = test
test_LDADD = libudp.la $(GLIB_LIBS) test_LDADD = $(COMMON_LDADD)
test-echo.sh:: test-echo.sh::
chmod +x $(srcdir)/$@ chmod +x $(srcdir)/$@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment