Changeset 5261 for pjproject/trunk/third_party/srtp/Makefile.in
- Timestamp:
- Mar 15, 2016 3:57:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/srtp/Makefile.in
r1730 r5261 10 10 # libcrypt.a static library implementing crypto engine 11 11 # libsrtp.a static library implementing srtp 12 # libsrtp.so shared library implementing srtp 12 13 # clean removes objects, libs, and executables 13 14 # distribution cleans and builds a .tgz 14 15 # tags builds etags file from all .c and .h files 15 16 16 .PHONY: all test build_table_apps 17 USE_OPENSSL = @USE_OPENSSL@ 18 HAVE_PCAP = @HAVE_PCAP@ 19 HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ 20 21 .PHONY: all shared_library test build_table_apps 17 22 18 23 all: test … … 27 32 test/replay_driver$(EXE) -v >/dev/null 28 33 test/dtls_srtp_driver$(EXE) >/dev/null 29 cd test; ./rtpw_test.sh >/dev/null 34 crypto/test/rand_gen_soak$(EXE) -v >/dev/null 35 cd test; $(abspath $(srcdir))/test/rtpw_test.sh >/dev/null 36 ifeq (1, $(USE_OPENSSL)) 37 cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh >/dev/null 38 endif 30 39 @echo "libsrtp test applications passed." 31 40 $(MAKE) -C crypto runtest … … 36 45 INCDIR = -Icrypto/include -I$(srcdir)/include -I$(srcdir)/crypto/include 37 46 DEFS = @DEFS@ 38 CPPFLAGS= @CPPFLAGS@47 CPPFLAGS= -fPIC @CPPFLAGS@ 39 48 CFLAGS = @CFLAGS@ 40 49 LIBS = @LIBS@ 41 LDFLAGS = @LDFLAGS@ -L.50 LDFLAGS = -L. @LDFLAGS@ 42 51 COMPILE = $(CC) $(DEFS) $(INCDIR) $(CPPFLAGS) $(CFLAGS) 43 52 SRTPLIB = -lsrtp 44 53 54 AR = @AR@ 45 55 RANLIB = @RANLIB@ 46 56 INSTALL = @INSTALL@ … … 49 59 # null on linux, bsd, and OS X and other OSes. 50 60 EXE = @EXE@ 61 51 62 # gdoi is the group domain of interpretation for isakmp, a group key 52 63 # management system which can provide keys for srtp 53 64 gdoi = @GDOI_OBJS@ 65 54 66 # Random source. 55 67 RNG_OBJS = @RNG_OBJS@ 68 HMAC_OBJS = @HMAC_OBJS@ 69 RNG_EXTRA_OBJS = @RNG_EXTRA_OBJS@ 70 AES_ICM_OBJS = @AES_ICM_OBJS@ 56 71 57 72 srcdir = @srcdir@ … … 63 78 includedir = @includedir@ 64 79 libdir = @libdir@ 65 80 bindir = @bindir@ 81 82 ifeq (1, $(HAVE_PKG_CONFIG)) 83 pkgconfigdir = $(libdir)/pkgconfig 84 pkgconfig_DATA = libsrtp.pc 85 endif 86 87 SHAREDLIBVERSION = 1 88 ifeq (linux,$(findstring linux,@host@)) 89 SHAREDLIB_DIR = $(libdir) 90 SHAREDLIB_LDFLAGS = -shared -Wl,-soname,$@ 91 SHAREDLIBSUFFIXNOVER = so 92 SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBVERSION) 93 else ifeq (mingw,$(findstring mingw,@host@)) 94 SHAREDLIB_DIR = $(bindir) 95 SHAREDLIB_LDFLAGS = -shared -Wl,--out-implib,libsrtp.dll.a 96 SHAREDLIBVERSION = 97 SHAREDLIBSUFFIXNOVER = dll 98 SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER) 99 else ifeq (darwin,$(findstring darwin,@host@)) 100 SHAREDLIB_DIR = $(libdir) 101 SHAREDLIB_LDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ 102 -fno-common -headerpad_max_install_names -install_name $(libdir)/$@ 103 SHAREDLIBSUFFIXNOVER = dylib 104 SHAREDLIBSUFFIX = $(SHAREDLIBVERSION).$(SHAREDLIBSUFFIXNOVER) 105 endif 66 106 67 107 # implicit rules for object files and test apps … … 76 116 # libcrypt.a (the crypto engine) 77 117 ciphers = crypto/cipher/cipher.o crypto/cipher/null_cipher.o \ 78 crypto/cipher/aes.o crypto/cipher/aes_icm.o \ 79 crypto/cipher/aes_cbc.o 80 81 hashes = crypto/hash/null_auth.o crypto/hash/sha1.o \ 82 crypto/hash/hmac.o crypto/hash/auth.o # crypto/hash/tmmhv2.o 118 $(AES_ICM_OBJS) 119 120 hashes = crypto/hash/null_auth.o crypto/hash/auth.o \ 121 $(HMAC_OBJS) 83 122 84 123 replay = crypto/replay/rdb.o crypto/replay/rdbx.o \ … … 89 128 ust = crypto/ust/ust.o 90 129 91 rng = crypto/rng/$(RNG_OBJS) crypto/rng/prng.o crypto/rng/ctr_prng.o130 rng = crypto/rng/$(RNG_OBJS) $(RNG_EXTRA_OBJS) 92 131 93 132 err = crypto/kernel/err.o … … 100 139 # libsrtp.a (implements srtp processing) 101 140 102 srtpobj = srtp/srtp.o 141 srtpobj = srtp/srtp.o srtp/ekt.o 103 142 104 143 libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi) 105 arcr libsrtp.a $^144 $(AR) cr libsrtp.a $^ 106 145 $(RANLIB) libsrtp.a 146 147 libsrtp.$(SHAREDLIBSUFFIX): $(srtpobj) $(cryptobj) $(gdoi) 148 $(CC) -shared -o $@ $(SHAREDLIB_LDFLAGS) \ 149 $^ $(LDFLAGS) $(LIBS) 150 if [ -n "$(SHAREDLIBVERSION)" ]; then \ 151 ln -sfn $@ libsrtp.$(SHAREDLIBSUFFIXNOVER); \ 152 fi 153 154 shared_library: libsrtp.$(SHAREDLIBSUFFIX) 107 155 108 156 # libcryptomath.a contains general-purpose routines that are used to … … 113 161 114 162 libcryptomath.a: $(cryptomath) 115 arcr libcryptomath.a $(cryptomath)163 $(AR) cr libcryptomath.a $(cryptomath) 116 164 $(RANLIB) libcryptomath.a 117 165 118 166 119 167 # test applications 120 121 crypto_testapp = crypto/test/aes_calc$(EXE) crypto/test/cipher_driver$(EXE) \ 168 ifneq (1, $(USE_OPENSSL)) 169 AES_CALC = crypto/test/aes_calc$(EXE) 170 endif 171 172 crypto_testapp = $(AES_CALC) crypto/test/cipher_driver$(EXE) \ 122 173 crypto/test/datatypes_driver$(EXE) crypto/test/kernel_driver$(EXE) \ 123 174 crypto/test/rand_gen$(EXE) crypto/test/sha1_driver$(EXE) \ 124 crypto/test/stat_driver$(EXE) 175 crypto/test/stat_driver$(EXE) crypto/test/rand_gen_soak$(EXE) 125 176 126 177 testapp = $(crypto_testapp) test/srtp_driver$(EXE) test/replay_driver$(EXE) \ … … 128 179 test/dtls_srtp_driver$(EXE) 129 180 181 ifeq (1, $(HAVE_PCAP)) 182 testapp += test/rtp_decoder$(EXE) 183 endif 184 130 185 $(testapp): libsrtp.a 131 186 132 test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c 133 $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 187 test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c \ 188 crypto/math/datatypes.c 189 $(COMPILE) -DTESTAPP_SOURCE=1 $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 190 191 ifeq (1, $(HAVE_PCAP)) 192 test/rtp_decoder$(EXE): test/rtp_decoder.c test/rtp.c test/getopt_s.c \ 193 crypto/math/datatypes.c 194 $(COMPILE) -DTESTAPP_SOURCE=1 $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 195 endif 134 196 135 197 test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c … … 140 202 141 203 test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c 204 $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 205 206 crypto/test/cipher_driver$(EXE): crypto/test/cipher_driver.c test/getopt_s.c 207 $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 208 209 crypto/test/kernel_driver$(EXE): crypto/test/kernel_driver.c test/getopt_s.c 210 $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 211 212 crypto/test/rand_gen$(EXE): crypto/test/rand_gen.c test/getopt_s.c 213 $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 214 215 crypto/test/rand_gen_soak$(EXE): crypto/test/rand_gen_soak.c test/getopt_s.c 142 216 $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) 143 217 … … 187 261 $(MAKE) -C doc 188 262 189 .PHONY: clean superclean install263 .PHONY: clean superclean distclean install 190 264 191 265 install: 192 @if [ -d $(DESTDIR)$(includedir)/srtp ]; then \193 echo "you should run 'make uninstall' first"; exit 1; \194 fi195 266 $(INSTALL) -d $(DESTDIR)$(includedir)/srtp 196 267 $(INSTALL) -d $(DESTDIR)$(libdir) 197 cp include/*.h $(DESTDIR)$(includedir)/srtp 198 cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp 268 cp $(srcdir)/include/*.h $(DESTDIR)$(includedir)/srtp 269 cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp 270 if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi 199 271 if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi 272 if [ -f libsrtp.dll.a ]; then cp libsrtp.dll.a $(DESTDIR)$(libdir)/; fi 273 if [ -f libsrtp.$(SHAREDLIBSUFFIX) ]; then \ 274 $(INSTALL) -d $(DESTDIR)$(SHAREDLIB_DIR); \ 275 cp libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/; \ 276 ln -sfn libsrtp.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp.$(SHAREDLIBSUFFIXNOVER); \ 277 fi 278 if [ "$(pkgconfig_DATA)" != "" ]; then \ 279 $(INSTALL) -d $(DESTDIR)$(pkgconfigdir); \ 280 cp $(top_builddir)/$(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/; \ 281 fi 200 282 201 283 uninstall: 202 rm -rf $(DESTDIR)$(includedir)/srtp 203 rm -rf $(DESTDIR)$(libdir)/libsrtp.a 284 rm -f $(DESTDIR)$(includedir)/srtp/*.h 285 rm -f $(DESTDIR)$(libdir)/libsrtp.* 286 -rmdir $(DESTDIR)$(includedir)/srtp 287 if [ "$(pkgconfig_DATA)" != "" ]; then \ 288 rm -f $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA); \ 289 fi 204 290 205 291 clean: 206 292 rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \ 207 libcryptomath.a libsrtp.a core *.core test/core293 libcryptomath.a libsrtp.a libsrtp.so libsrtp.dll.a core *.core test/core 208 294 for a in * */* */*/*; do \ 209 295 if [ -f "$$a~" ] ; then rm -f $$a~; fi; \ … … 218 304 superclean: clean 219 305 rm -rf crypto/include/config.h config.log config.cache config.status \ 220 Makefile .gdb_history test/.gdb_history .DS_Store 306 Makefile crypto/Makefile doc/Makefile \ 307 .gdb_history test/.gdb_history .DS_Store 221 308 rm -rf autom4te.cache 222 309 223 distname = srtp-$(shell cat VERSION) 310 distclean: superclean 311 312 distname = libsrtp-$(shell cat VERSION) 224 313 225 314 distribution: runtest superclean … … 228 317 mv ../$(distname).tgz ../$(distname).tgz.bak; \ 229 318 fi 230 cd ..; tar cvzf $(distname).tgz srtp319 cd ..; tar cvzf $(distname).tgz libsrtp 231 320 232 321 # EOF
Note: See TracChangeset
for help on using the changeset viewer.