Reduce indirection in makefiles

This commit is contained in:
Travis Cross 2012-07-06 15:34:27 +00:00
parent 63cd37a2c4
commit 49346a57f4
3 changed files with 80 additions and 86 deletions

View File

@ -5,48 +5,43 @@
# Viktor Krikun <v.krikun@soft-industry.com> <v.krikun@gmail.com> # Viktor Krikun <v.krikun@soft-industry.com> <v.krikun@gmail.com>
# #
TEST_DIR=$(top_srcdir)/test
TOP_SRCDIR=$(top_srcdir)/include
THIRD_DIR=$(top_srcdir)/third_party
libzrtp_includedir=$(includedir)/libzrtp libzrtp_includedir=$(includedir)/libzrtp
libzrtp_include_HEADERS = \ libzrtp_include_HEADERS = \
$(TOP_SRCDIR)/zrtp.h \ $(top_srcdir)/include/zrtp.h \
$(TOP_SRCDIR)/zrtp_base.h \ $(top_srcdir)/include/zrtp_base.h \
$(TOP_SRCDIR)/zrtp_config.h \ $(top_srcdir)/include/zrtp_config.h \
$(TOP_SRCDIR)/zrtp_config_user.h \ $(top_srcdir)/include/zrtp_config_user.h \
$(TOP_SRCDIR)/zrtp_config_unix.h \ $(top_srcdir)/include/zrtp_config_unix.h \
$(TOP_SRCDIR)/zrtp_crypto.h \ $(top_srcdir)/include/zrtp_crypto.h \
$(TOP_SRCDIR)/zrtp_engine.h \ $(top_srcdir)/include/zrtp_engine.h \
$(TOP_SRCDIR)/zrtp_error.h \ $(top_srcdir)/include/zrtp_error.h \
$(TOP_SRCDIR)/zrtp_iface.h \ $(top_srcdir)/include/zrtp_iface.h \
$(TOP_SRCDIR)/zrtp_iface_scheduler.h \ $(top_srcdir)/include/zrtp_iface_scheduler.h \
$(TOP_SRCDIR)/zrtp_iface_cache.h \ $(top_srcdir)/include/zrtp_iface_cache.h \
$(TOP_SRCDIR)/zrtp_iface_system.h \ $(top_srcdir)/include/zrtp_iface_system.h \
$(TOP_SRCDIR)/zrtp_legal.h \ $(top_srcdir)/include/zrtp_legal.h \
$(TOP_SRCDIR)/zrtp_list.h \ $(top_srcdir)/include/zrtp_list.h \
$(TOP_SRCDIR)/zrtp_log.h \ $(top_srcdir)/include/zrtp_log.h \
$(TOP_SRCDIR)/zrtp_pbx.h \ $(top_srcdir)/include/zrtp_pbx.h \
$(TOP_SRCDIR)/zrtp_protocol.h \ $(top_srcdir)/include/zrtp_protocol.h \
$(TOP_SRCDIR)/zrtp_srtp.h \ $(top_srcdir)/include/zrtp_srtp.h \
$(TOP_SRCDIR)/zrtp_srtp_builtin.h \ $(top_srcdir)/include/zrtp_srtp_builtin.h \
$(TOP_SRCDIR)/zrtp_string.h \ $(top_srcdir)/include/zrtp_string.h \
$(TOP_SRCDIR)/zrtp_types.h \ $(top_srcdir)/include/zrtp_types.h \
$(TOP_SRCDIR)/zrtp_version.h \ $(top_srcdir)/include/zrtp_version.h \
\ \
$(THIRD_DIR)/bnlib/bn.h \ $(top_srcdir)/third_party/bnlib/bn.h \
\ \
$(THIRD_DIR)/bgaes/aes.h \ $(top_srcdir)/third_party/bgaes/aes.h \
$(THIRD_DIR)/bgaes/aesopt.h \ $(top_srcdir)/third_party/bgaes/aesopt.h \
$(THIRD_DIR)/bgaes/aestab.h \ $(top_srcdir)/third_party/bgaes/aestab.h \
$(THIRD_DIR)/bgaes/bg2zrtp.h \ $(top_srcdir)/third_party/bgaes/bg2zrtp.h \
$(THIRD_DIR)/bgaes/brg_types.h \ $(top_srcdir)/third_party/bgaes/brg_types.h \
$(THIRD_DIR)/bgaes/sha1.h \ $(top_srcdir)/third_party/bgaes/sha1.h \
$(THIRD_DIR)/bgaes/sha2.h $(top_srcdir)/third_party/bgaes/sha2.h
if ZRTP_BUILD_ENTERPRISE if ZRTP_BUILD_ENTERPRISE
libzrtp_include_HEADERS += $(TOP_SRCDIR)/zrtp_ec.h libzrtp_include_HEADERS += $(top_srcdir)/include/zrtp_ec.h
endif endif
SUBDIRS = third_party/bnlib SUBDIRS = third_party/bnlib
@ -62,3 +57,4 @@ endif
uninstall: uninstall:
rm -rf $(prefix)/include/libzrtp rm -rf $(prefix)/include/libzrtp
rm -f $(prefix)/lib/libzrtp.a rm -f $(prefix)/lib/libzrtp.a

View File

@ -5,52 +5,51 @@
# Viktor Krikun <v.krikun@soft-industry.com> <v.krikun@gmail.com> # Viktor Krikun <v.krikun@soft-industry.com> <v.krikun@gmail.com>
# #
TOP_SRCDIR=$(top_srcdir) INCLUDES = -I$(top_srcdir)/include \
INCLUDES = -I$(TOP_SRCDIR)/include \ -I$(top_srcdir)/. \
-I$(TOP_SRCDIR)/. \ -I$(top_srcdir)/third_party/bgaes \
-I$(TOP_SRCDIR)/third_party/bgaes \ -I$(top_srcdir)/third_party/bnlib
-I$(TOP_SRCDIR)/third_party/bnlib
lib_LIBRARIES = libzrtp.a 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 \ libzrtp_a_SOURCES = $(top_srcdir)/src/zrtp.c \
$(TOP_SRCDIR)/src/zrtp_crc.c \ $(top_srcdir)/src/zrtp_crc.c \
$(TOP_SRCDIR)/src/zrtp_crypto_aes.c \ $(top_srcdir)/src/zrtp_crypto_aes.c \
$(TOP_SRCDIR)/src/zrtp_crypto_atl.c \ $(top_srcdir)/src/zrtp_crypto_atl.c \
$(TOP_SRCDIR)/src/zrtp_crypto_hash.c \ $(top_srcdir)/src/zrtp_crypto_hash.c \
$(TOP_SRCDIR)/src/zrtp_crypto_pk.c \ $(top_srcdir)/src/zrtp_crypto_pk.c \
$(TOP_SRCDIR)/src/zrtp_crypto_sas.c \ $(top_srcdir)/src/zrtp_crypto_sas.c \
$(TOP_SRCDIR)/src/zrtp_datatypes.c \ $(top_srcdir)/src/zrtp_datatypes.c \
$(TOP_SRCDIR)/src/zrtp_engine.c \ $(top_srcdir)/src/zrtp_engine.c \
$(TOP_SRCDIR)/src/zrtp_iface_scheduler.c \ $(top_srcdir)/src/zrtp_iface_scheduler.c \
$(TOP_SRCDIR)/src/zrtp_iface_sys.c \ $(top_srcdir)/src/zrtp_iface_sys.c \
$(TOP_SRCDIR)/src/zrtp_initiator.c \ $(top_srcdir)/src/zrtp_initiator.c \
$(TOP_SRCDIR)/src/zrtp_legal.c \ $(top_srcdir)/src/zrtp_legal.c \
$(TOP_SRCDIR)/src/zrtp_list.c \ $(top_srcdir)/src/zrtp_list.c \
$(TOP_SRCDIR)/src/zrtp_log.c \ $(top_srcdir)/src/zrtp_log.c \
$(TOP_SRCDIR)/src/zrtp_pbx.c \ $(top_srcdir)/src/zrtp_pbx.c \
$(TOP_SRCDIR)/src/zrtp_protocol.c \ $(top_srcdir)/src/zrtp_protocol.c \
$(TOP_SRCDIR)/src/zrtp_responder.c \ $(top_srcdir)/src/zrtp_responder.c \
$(TOP_SRCDIR)/src/zrtp_rng.c \ $(top_srcdir)/src/zrtp_rng.c \
$(TOP_SRCDIR)/src/zrtp_srtp_builtin.c \ $(top_srcdir)/src/zrtp_srtp_builtin.c \
$(TOP_SRCDIR)/src/zrtp_string.c \ $(top_srcdir)/src/zrtp_string.c \
$(TOP_SRCDIR)/src/zrtp_utils.c \ $(top_srcdir)/src/zrtp_utils.c \
$(TOP_SRCDIR)/src/zrtp_utils_proto.c \ $(top_srcdir)/src/zrtp_utils_proto.c \
\ \
$(TOP_SRCDIR)/third_party/bgaes/aes_modes.c \ $(top_srcdir)/third_party/bgaes/aes_modes.c \
$(TOP_SRCDIR)/third_party/bgaes/aescrypt.c \ $(top_srcdir)/third_party/bgaes/aescrypt.c \
$(TOP_SRCDIR)/third_party/bgaes/aeskey.c \ $(top_srcdir)/third_party/bgaes/aeskey.c \
$(TOP_SRCDIR)/third_party/bgaes/aestab.c \ $(top_srcdir)/third_party/bgaes/aestab.c \
$(TOP_SRCDIR)/third_party/bgaes/sha1.c \ $(top_srcdir)/third_party/bgaes/sha1.c \
$(TOP_SRCDIR)/third_party/bgaes/sha2.c\ $(top_srcdir)/third_party/bgaes/sha2.c\
\ \
$(TOP_SRCDIR)/src/zrtp_iface_cache.c \ $(top_srcdir)/src/zrtp_iface_cache.c
$(TOP_SRCDIR)/src/zrtp_engine_driven.c $(top_srcdir)/src/zrtp_engine_driven.c
if ZRTP_BUILD_ENTERPRISE if ZRTP_BUILD_ENTERPRISE
libzrtp_a_SOURCES +=$(TOP_SRCDIR)/src/zrtp_crypto_ec.c \ libzrtp_a_SOURCES +=$(top_srcdir)/src/zrtp_crypto_ec.c \
$(TOP_SRCDIR)/src/zrtp_crypto_ecdh.c $(top_srcdir)/src/zrtp_crypto_ecdh.c
endif endif
SUBDIRS = test SUBDIRS = test

View File

@ -7,23 +7,22 @@
TOP_SRCDIR=$(top_srcdir) INCLUDES = -I$(top_srcdir)/include \
INCLUDES = -I$(TOP_SRCDIR)/include \ -I$(top_srcdir)/include/enterprise \
-I$(TOP_SRCDIR)/include/enterprise \ -I$(top_srcdir)/. \
-I$(TOP_SRCDIR)/. \ -I$(top_srcdir)/test \
-I$(TOP_SRCDIR)/test \ -I$(top_srcdir)/test/cmockery \
-I$(TOP_SRCDIR)/test/cmockery \ -I$(top_srcdir)/third_party/bgaes \
-I$(TOP_SRCDIR)/third_party/bgaes \ -I$(top_srcdir)/third_party/bnlib
-I$(TOP_SRCDIR)/third_party/bnlib
check_PROGRAMS = cache_test check_PROGRAMS = cache_test
### ZRTP Cache testing ### ZRTP Cache testing
cache_test_SOURCES = $(TOP_SRCDIR)/test/cmockery/cmockery.c \ cache_test_SOURCES = $(top_srcdir)/test/cmockery/cmockery.c \
$(TOP_SRCDIR)/test/cache_test.c $(top_srcdir)/test/cache_test.c
cache_test_LDADD = ../libzrtp.a $(TOP_SRCDIR)/third_party/bnlib/libbn.a -lpthread cache_test_LDADD = ../libzrtp.a $(top_srcdir)/third_party/bnlib/libbn.a -lpthread
SUBDIRS = . SUBDIRS = .