]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Reduce indirection in makefiles
authorTravis Cross <tc@traviscross.com>
Fri, 6 Jul 2012 15:34:27 +0000 (15:34 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 11 Feb 2013 16:42:04 +0000 (16:42 +0000)
libs/libzrtp/Makefile.am
libs/libzrtp/build/Makefile.am
libs/libzrtp/build/test/Makefile.am

index d0bd6c32c95fb90250543798df5e3bfd97e7b683..22596c1e355492e2186f8f915c2f8dcc7e404c2f 100644 (file)
@@ -5,48 +5,43 @@
 # 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_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
+
index 4252e672ecbe7bd16641ae2b4ea49d9d50051eb0..26a8e9ae41fc51b4628d038da82dca8007186548 100644 (file)
@@ -5,52 +5,51 @@
 # Viktor Krikun <v.krikun@soft-industry.com> <v.krikun@gmail.com>
 #
 
-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
index 4a9321c69ff7da1e869b69bd7f2416541eba92dd..7b4b148114517d699c0defba26a2b09a67c525d0 100644 (file)
@@ -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 = .