From 49346a57f4195cc69fc7d9a7240c615a3be7c9e3 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 6 Jul 2012 15:34:27 +0000 Subject: [PATCH] Reduce indirection in makefiles --- libs/libzrtp/Makefile.am | 68 ++++++++++++------------- libs/libzrtp/build/Makefile.am | 77 ++++++++++++++--------------- libs/libzrtp/build/test/Makefile.am | 21 ++++---- 3 files changed, 80 insertions(+), 86 deletions(-) diff --git a/libs/libzrtp/Makefile.am b/libs/libzrtp/Makefile.am index d0bd6c32c9..22596c1e35 100644 --- a/libs/libzrtp/Makefile.am +++ b/libs/libzrtp/Makefile.am @@ -5,48 +5,43 @@ # Viktor Krikun # -TEST_DIR=$(top_srcdir)/test -TOP_SRCDIR=$(top_srcdir)/include -THIRD_DIR=$(top_srcdir)/third_party - libzrtp_includedir=$(includedir)/libzrtp - libzrtp_include_HEADERS = \ - $(TOP_SRCDIR)/zrtp.h \ - $(TOP_SRCDIR)/zrtp_base.h \ - $(TOP_SRCDIR)/zrtp_config.h \ - $(TOP_SRCDIR)/zrtp_config_user.h \ - $(TOP_SRCDIR)/zrtp_config_unix.h \ - $(TOP_SRCDIR)/zrtp_crypto.h \ - $(TOP_SRCDIR)/zrtp_engine.h \ - $(TOP_SRCDIR)/zrtp_error.h \ - $(TOP_SRCDIR)/zrtp_iface.h \ - $(TOP_SRCDIR)/zrtp_iface_scheduler.h \ - $(TOP_SRCDIR)/zrtp_iface_cache.h \ - $(TOP_SRCDIR)/zrtp_iface_system.h \ - $(TOP_SRCDIR)/zrtp_legal.h \ - $(TOP_SRCDIR)/zrtp_list.h \ - $(TOP_SRCDIR)/zrtp_log.h \ - $(TOP_SRCDIR)/zrtp_pbx.h \ - $(TOP_SRCDIR)/zrtp_protocol.h \ - $(TOP_SRCDIR)/zrtp_srtp.h \ - $(TOP_SRCDIR)/zrtp_srtp_builtin.h \ - $(TOP_SRCDIR)/zrtp_string.h \ - $(TOP_SRCDIR)/zrtp_types.h \ - $(TOP_SRCDIR)/zrtp_version.h \ + $(top_srcdir)/include/zrtp.h \ + $(top_srcdir)/include/zrtp_base.h \ + $(top_srcdir)/include/zrtp_config.h \ + $(top_srcdir)/include/zrtp_config_user.h \ + $(top_srcdir)/include/zrtp_config_unix.h \ + $(top_srcdir)/include/zrtp_crypto.h \ + $(top_srcdir)/include/zrtp_engine.h \ + $(top_srcdir)/include/zrtp_error.h \ + $(top_srcdir)/include/zrtp_iface.h \ + $(top_srcdir)/include/zrtp_iface_scheduler.h \ + $(top_srcdir)/include/zrtp_iface_cache.h \ + $(top_srcdir)/include/zrtp_iface_system.h \ + $(top_srcdir)/include/zrtp_legal.h \ + $(top_srcdir)/include/zrtp_list.h \ + $(top_srcdir)/include/zrtp_log.h \ + $(top_srcdir)/include/zrtp_pbx.h \ + $(top_srcdir)/include/zrtp_protocol.h \ + $(top_srcdir)/include/zrtp_srtp.h \ + $(top_srcdir)/include/zrtp_srtp_builtin.h \ + $(top_srcdir)/include/zrtp_string.h \ + $(top_srcdir)/include/zrtp_types.h \ + $(top_srcdir)/include/zrtp_version.h \ \ - $(THIRD_DIR)/bnlib/bn.h \ + $(top_srcdir)/third_party/bnlib/bn.h \ \ - $(THIRD_DIR)/bgaes/aes.h \ - $(THIRD_DIR)/bgaes/aesopt.h \ - $(THIRD_DIR)/bgaes/aestab.h \ - $(THIRD_DIR)/bgaes/bg2zrtp.h \ - $(THIRD_DIR)/bgaes/brg_types.h \ - $(THIRD_DIR)/bgaes/sha1.h \ - $(THIRD_DIR)/bgaes/sha2.h + $(top_srcdir)/third_party/bgaes/aes.h \ + $(top_srcdir)/third_party/bgaes/aesopt.h \ + $(top_srcdir)/third_party/bgaes/aestab.h \ + $(top_srcdir)/third_party/bgaes/bg2zrtp.h \ + $(top_srcdir)/third_party/bgaes/brg_types.h \ + $(top_srcdir)/third_party/bgaes/sha1.h \ + $(top_srcdir)/third_party/bgaes/sha2.h if ZRTP_BUILD_ENTERPRISE -libzrtp_include_HEADERS += $(TOP_SRCDIR)/zrtp_ec.h +libzrtp_include_HEADERS += $(top_srcdir)/include/zrtp_ec.h endif SUBDIRS = third_party/bnlib @@ -62,3 +57,4 @@ endif uninstall: rm -rf $(prefix)/include/libzrtp rm -f $(prefix)/lib/libzrtp.a + diff --git a/libs/libzrtp/build/Makefile.am b/libs/libzrtp/build/Makefile.am index 4252e672ec..26a8e9ae41 100644 --- a/libs/libzrtp/build/Makefile.am +++ b/libs/libzrtp/build/Makefile.am @@ -5,52 +5,51 @@ # Viktor Krikun # -TOP_SRCDIR=$(top_srcdir) -INCLUDES = -I$(TOP_SRCDIR)/include \ - -I$(TOP_SRCDIR)/. \ - -I$(TOP_SRCDIR)/third_party/bgaes \ - -I$(TOP_SRCDIR)/third_party/bnlib +INCLUDES = -I$(top_srcdir)/include \ + -I$(top_srcdir)/. \ + -I$(top_srcdir)/third_party/bgaes \ + -I$(top_srcdir)/third_party/bnlib lib_LIBRARIES = libzrtp.a -libzrtp_a_LIBADD = $(TOP_SRCDIR)/third_party/bnlib/libbn.a +libzrtp_a_LIBADD = $(top_srcdir)/third_party/bnlib/libbn.a -libzrtp_a_SOURCES = $(TOP_SRCDIR)/src/zrtp.c \ - $(TOP_SRCDIR)/src/zrtp_crc.c \ - $(TOP_SRCDIR)/src/zrtp_crypto_aes.c \ - $(TOP_SRCDIR)/src/zrtp_crypto_atl.c \ - $(TOP_SRCDIR)/src/zrtp_crypto_hash.c \ - $(TOP_SRCDIR)/src/zrtp_crypto_pk.c \ - $(TOP_SRCDIR)/src/zrtp_crypto_sas.c \ - $(TOP_SRCDIR)/src/zrtp_datatypes.c \ - $(TOP_SRCDIR)/src/zrtp_engine.c \ - $(TOP_SRCDIR)/src/zrtp_iface_scheduler.c \ - $(TOP_SRCDIR)/src/zrtp_iface_sys.c \ - $(TOP_SRCDIR)/src/zrtp_initiator.c \ - $(TOP_SRCDIR)/src/zrtp_legal.c \ - $(TOP_SRCDIR)/src/zrtp_list.c \ - $(TOP_SRCDIR)/src/zrtp_log.c \ - $(TOP_SRCDIR)/src/zrtp_pbx.c \ - $(TOP_SRCDIR)/src/zrtp_protocol.c \ - $(TOP_SRCDIR)/src/zrtp_responder.c \ - $(TOP_SRCDIR)/src/zrtp_rng.c \ - $(TOP_SRCDIR)/src/zrtp_srtp_builtin.c \ - $(TOP_SRCDIR)/src/zrtp_string.c \ - $(TOP_SRCDIR)/src/zrtp_utils.c \ - $(TOP_SRCDIR)/src/zrtp_utils_proto.c \ +libzrtp_a_SOURCES = $(top_srcdir)/src/zrtp.c \ + $(top_srcdir)/src/zrtp_crc.c \ + $(top_srcdir)/src/zrtp_crypto_aes.c \ + $(top_srcdir)/src/zrtp_crypto_atl.c \ + $(top_srcdir)/src/zrtp_crypto_hash.c \ + $(top_srcdir)/src/zrtp_crypto_pk.c \ + $(top_srcdir)/src/zrtp_crypto_sas.c \ + $(top_srcdir)/src/zrtp_datatypes.c \ + $(top_srcdir)/src/zrtp_engine.c \ + $(top_srcdir)/src/zrtp_iface_scheduler.c \ + $(top_srcdir)/src/zrtp_iface_sys.c \ + $(top_srcdir)/src/zrtp_initiator.c \ + $(top_srcdir)/src/zrtp_legal.c \ + $(top_srcdir)/src/zrtp_list.c \ + $(top_srcdir)/src/zrtp_log.c \ + $(top_srcdir)/src/zrtp_pbx.c \ + $(top_srcdir)/src/zrtp_protocol.c \ + $(top_srcdir)/src/zrtp_responder.c \ + $(top_srcdir)/src/zrtp_rng.c \ + $(top_srcdir)/src/zrtp_srtp_builtin.c \ + $(top_srcdir)/src/zrtp_string.c \ + $(top_srcdir)/src/zrtp_utils.c \ + $(top_srcdir)/src/zrtp_utils_proto.c \ \ - $(TOP_SRCDIR)/third_party/bgaes/aes_modes.c \ - $(TOP_SRCDIR)/third_party/bgaes/aescrypt.c \ - $(TOP_SRCDIR)/third_party/bgaes/aeskey.c \ - $(TOP_SRCDIR)/third_party/bgaes/aestab.c \ - $(TOP_SRCDIR)/third_party/bgaes/sha1.c \ - $(TOP_SRCDIR)/third_party/bgaes/sha2.c\ + $(top_srcdir)/third_party/bgaes/aes_modes.c \ + $(top_srcdir)/third_party/bgaes/aescrypt.c \ + $(top_srcdir)/third_party/bgaes/aeskey.c \ + $(top_srcdir)/third_party/bgaes/aestab.c \ + $(top_srcdir)/third_party/bgaes/sha1.c \ + $(top_srcdir)/third_party/bgaes/sha2.c\ \ - $(TOP_SRCDIR)/src/zrtp_iface_cache.c \ - $(TOP_SRCDIR)/src/zrtp_engine_driven.c + $(top_srcdir)/src/zrtp_iface_cache.c + $(top_srcdir)/src/zrtp_engine_driven.c if ZRTP_BUILD_ENTERPRISE -libzrtp_a_SOURCES +=$(TOP_SRCDIR)/src/zrtp_crypto_ec.c \ - $(TOP_SRCDIR)/src/zrtp_crypto_ecdh.c +libzrtp_a_SOURCES +=$(top_srcdir)/src/zrtp_crypto_ec.c \ + $(top_srcdir)/src/zrtp_crypto_ecdh.c endif SUBDIRS = test diff --git a/libs/libzrtp/build/test/Makefile.am b/libs/libzrtp/build/test/Makefile.am index 4a9321c69f..7b4b148114 100644 --- a/libs/libzrtp/build/test/Makefile.am +++ b/libs/libzrtp/build/test/Makefile.am @@ -7,23 +7,22 @@ -TOP_SRCDIR=$(top_srcdir) -INCLUDES = -I$(TOP_SRCDIR)/include \ - -I$(TOP_SRCDIR)/include/enterprise \ - -I$(TOP_SRCDIR)/. \ - -I$(TOP_SRCDIR)/test \ - -I$(TOP_SRCDIR)/test/cmockery \ - -I$(TOP_SRCDIR)/third_party/bgaes \ - -I$(TOP_SRCDIR)/third_party/bnlib +INCLUDES = -I$(top_srcdir)/include \ + -I$(top_srcdir)/include/enterprise \ + -I$(top_srcdir)/. \ + -I$(top_srcdir)/test \ + -I$(top_srcdir)/test/cmockery \ + -I$(top_srcdir)/third_party/bgaes \ + -I$(top_srcdir)/third_party/bnlib check_PROGRAMS = cache_test ### ZRTP Cache testing -cache_test_SOURCES = $(TOP_SRCDIR)/test/cmockery/cmockery.c \ - $(TOP_SRCDIR)/test/cache_test.c -cache_test_LDADD = ../libzrtp.a $(TOP_SRCDIR)/third_party/bnlib/libbn.a -lpthread +cache_test_SOURCES = $(top_srcdir)/test/cmockery/cmockery.c \ + $(top_srcdir)/test/cache_test.c +cache_test_LDADD = ../libzrtp.a $(top_srcdir)/third_party/bnlib/libbn.a -lpthread SUBDIRS = .