Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 1 | # Makefile for secure rtp |
| 2 | # |
| 3 | # David A. McGrew |
| 4 | # Cisco Systems, Inc. |
| 5 | |
| 6 | # targets: |
| 7 | # |
| 8 | # runtest runs test applications |
| 9 | # test builds test applications |
| 10 | # libcrypt.a static library implementing crypto engine |
| 11 | # libsrtp.a static library implementing srtp |
jfigus | 5004642 | 2013-10-10 08:35:16 -0400 | [diff] [blame] | 12 | # libsrtp.so shared library implementing srtp |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 13 | # clean removes objects, libs, and executables |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 14 | # distribution cleans and builds a .tgz |
| 15 | # tags builds etags file from all .c and .h files |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 16 | |
jfigus | 8c36da2 | 2013-10-01 16:41:19 -0400 | [diff] [blame] | 17 | USE_OPENSSL = @USE_OPENSSL@ |
Bernardo Torres | b3c5142 | 2014-10-14 12:40:09 -0300 | [diff] [blame] | 18 | HAVE_PCAP = @HAVE_PCAP@ |
Saúl Ibarra Corretgé | b86063c | 2014-10-01 11:23:24 +0200 | [diff] [blame] | 19 | HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ |
jfigus | 8c36da2 | 2013-10-01 16:41:19 -0400 | [diff] [blame] | 20 | |
David McGrew | 5529f10 | 2005-09-29 11:25:10 +0000 | [diff] [blame] | 21 | .PHONY: all test build_table_apps |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 22 | |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 23 | all: test |
| 24 | |
David McGrew | 5529f10 | 2005-09-29 11:25:10 +0000 | [diff] [blame] | 25 | runtest: build_table_apps test |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 26 | @echo "running libsrtp test applications..." |
Marcus Sundberg | b0a9311 | 2005-10-02 21:11:33 +0000 | [diff] [blame] | 27 | crypto/test/cipher_driver$(EXE) -v >/dev/null |
| 28 | crypto/test/kernel_driver$(EXE) -v >/dev/null |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 29 | test/rdbx_driver$(EXE) -v >/dev/null |
| 30 | test/srtp_driver$(EXE) -v >/dev/null |
| 31 | test/roc_driver$(EXE) -v >/dev/null |
David McGrew | 11b2e41 | 2006-03-16 19:13:31 +0000 | [diff] [blame] | 32 | test/replay_driver$(EXE) -v >/dev/null |
David McGrew | 0cb86ee | 2006-07-07 15:46:57 +0000 | [diff] [blame] | 33 | test/dtls_srtp_driver$(EXE) >/dev/null |
Jonathan Lennox | f464743 | 2010-05-14 23:17:51 +0000 | [diff] [blame] | 34 | cd test; $(abspath $(srcdir))/test/rtpw_test.sh >/dev/null |
jfigus | 8c36da2 | 2013-10-01 16:41:19 -0400 | [diff] [blame] | 35 | ifeq (1, $(USE_OPENSSL)) |
| 36 | cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh >/dev/null |
| 37 | endif |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 38 | @echo "libsrtp test applications passed." |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 39 | $(MAKE) -C crypto runtest |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 40 | |
| 41 | # makefile variables |
| 42 | |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 43 | CC = @CC@ |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 44 | INCDIR = -Icrypto/include -I$(srcdir)/include -I$(srcdir)/crypto/include |
jfigus | 4494760 | 2014-10-08 13:08:52 -0400 | [diff] [blame] | 45 | DEFS = @DEFS@ |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 46 | CPPFLAGS= @CPPFLAGS@ |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 47 | CFLAGS = @CFLAGS@ |
| 48 | LIBS = @LIBS@ |
| 49 | LDFLAGS = @LDFLAGS@ -L. |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 50 | COMPILE = $(CC) $(DEFS) $(INCDIR) $(CPPFLAGS) $(CFLAGS) |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 51 | SRTPLIB = -lsrtp |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 52 | |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 53 | RANLIB = @RANLIB@ |
| 54 | INSTALL = @INSTALL@ |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 55 | |
Marcus Sundberg | 95e2372 | 2005-10-02 19:44:28 +0000 | [diff] [blame] | 56 | # EXE defines the suffix on executables - it's .exe for Windows, and |
| 57 | # null on linux, bsd, and OS X and other OSes. |
| 58 | EXE = @EXE@ |
Cullen Jennings | ef29a90 | 2013-04-30 12:54:54 -0600 | [diff] [blame] | 59 | |
Marcus Sundberg | 5c714e4 | 2005-10-03 15:16:06 +0000 | [diff] [blame] | 60 | # Random source. |
| 61 | RNG_OBJS = @RNG_OBJS@ |
jfigus | 0d3a268 | 2013-04-02 15:42:37 -0400 | [diff] [blame] | 62 | HMAC_OBJS = @HMAC_OBJS@ |
jfigus | a14b5a0 | 2013-03-29 12:24:12 -0400 | [diff] [blame] | 63 | RNG_EXTRA_OBJS = @RNG_EXTRA_OBJS@ |
jfigus | 0d3a268 | 2013-04-02 15:42:37 -0400 | [diff] [blame] | 64 | AES_ICM_OBJS = @AES_ICM_OBJS@ |
Marcus Sundberg | 95e2372 | 2005-10-02 19:44:28 +0000 | [diff] [blame] | 65 | |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 66 | srcdir = @srcdir@ |
| 67 | top_srcdir = @top_srcdir@ |
| 68 | top_builddir = @top_builddir@ |
| 69 | VPATH = @srcdir@ |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 70 | prefix = @prefix@ |
| 71 | exec_prefix = @exec_prefix@ |
| 72 | includedir = @includedir@ |
| 73 | libdir = @libdir@ |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 74 | |
Saúl Ibarra Corretgé | b86063c | 2014-10-01 11:23:24 +0200 | [diff] [blame] | 75 | ifeq (1, $(HAVE_PKG_CONFIG)) |
| 76 | pkgconfigdir = $(libdir)/pkgconfig |
| 77 | pkgconfig_DATA = libsrtp.pc |
| 78 | endif |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 79 | |
| 80 | # implicit rules for object files and test apps |
| 81 | |
| 82 | %.o: %.c |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 83 | $(COMPILE) -c $< -o $@ |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 84 | |
Marcus Sundberg | 1f84c40 | 2005-10-06 13:59:21 +0000 | [diff] [blame] | 85 | %$(EXE): %.c |
Marcus Sundberg | 95e2372 | 2005-10-02 19:44:28 +0000 | [diff] [blame] | 86 | $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 87 | |
| 88 | |
| 89 | # libcrypt.a (the crypto engine) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 90 | ciphers = crypto/cipher/cipher.o crypto/cipher/null_cipher.o \ |
jfigus | 0d3a268 | 2013-04-02 15:42:37 -0400 | [diff] [blame] | 91 | $(AES_ICM_OBJS) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 92 | |
jfigus | 0d3a268 | 2013-04-02 15:42:37 -0400 | [diff] [blame] | 93 | hashes = crypto/hash/null_auth.o crypto/hash/auth.o \ |
| 94 | $(HMAC_OBJS) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 95 | |
| 96 | replay = crypto/replay/rdb.o crypto/replay/rdbx.o \ |
| 97 | crypto/replay/ut_sim.o |
| 98 | |
| 99 | math = crypto/math/datatypes.o crypto/math/stat.o |
| 100 | |
| 101 | ust = crypto/ust/ust.o |
| 102 | |
jfigus | a14b5a0 | 2013-03-29 12:24:12 -0400 | [diff] [blame] | 103 | rng = crypto/rng/$(RNG_OBJS) $(RNG_EXTRA_OBJS) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 104 | |
| 105 | err = crypto/kernel/err.o |
| 106 | |
| 107 | kernel = crypto/kernel/crypto_kernel.o crypto/kernel/alloc.o \ |
| 108 | crypto/kernel/key.o $(rng) $(err) # $(ust) |
| 109 | |
| 110 | cryptobj = $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(replay) |
| 111 | |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 112 | # libsrtp.a (implements srtp processing) |
| 113 | |
David McGrew | 79870d6 | 2007-06-15 18:17:39 +0000 | [diff] [blame] | 114 | srtpobj = srtp/srtp.o srtp/ekt.o |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 115 | |
jfigus | 97a80f4 | 2014-11-04 14:15:40 -0500 | [diff] [blame] | 116 | libsrtp.a: $(srtpobj) $(cryptobj) |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 117 | ar cr libsrtp.a $^ |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 118 | $(RANLIB) libsrtp.a |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 119 | |
jfigus | 97a80f4 | 2014-11-04 14:15:40 -0500 | [diff] [blame] | 120 | libsrtp.so: $(srtpobj) $(cryptobj) |
jfigus | 2b48665 | 2014-07-24 15:01:41 -0400 | [diff] [blame] | 121 | $(CC) -shared -Wl,-soname,libsrtp.so \ |
| 122 | -o libsrtp.so $^ $(LDFLAGS) |
jfigus | 5004642 | 2013-10-10 08:35:16 -0400 | [diff] [blame] | 123 | |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 124 | # libcryptomath.a contains general-purpose routines that are used to |
| 125 | # generate tables and verify cryptoalgorithm implementations - this |
| 126 | # library is not meant to be included in production code |
| 127 | |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 128 | cryptomath = crypto/math/math.o crypto/math/gf2_8.o |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 129 | |
| 130 | libcryptomath.a: $(cryptomath) |
| 131 | ar cr libcryptomath.a $(cryptomath) |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 132 | $(RANLIB) libcryptomath.a |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 133 | |
| 134 | |
| 135 | # test applications |
jfigus | 0d3a268 | 2013-04-02 15:42:37 -0400 | [diff] [blame] | 136 | ifneq (1, $(USE_OPENSSL)) |
| 137 | AES_CALC = crypto/test/aes_calc$(EXE) |
| 138 | endif |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 139 | |
jfigus | 0d3a268 | 2013-04-02 15:42:37 -0400 | [diff] [blame] | 140 | crypto_testapp = $(AES_CALC) crypto/test/cipher_driver$(EXE) \ |
Marcus Sundberg | b0a9311 | 2005-10-02 21:11:33 +0000 | [diff] [blame] | 141 | crypto/test/datatypes_driver$(EXE) crypto/test/kernel_driver$(EXE) \ |
jfigus | 339b61d | 2014-11-04 15:36:15 -0500 | [diff] [blame^] | 142 | crypto/test/sha1_driver$(EXE) \ |
| 143 | crypto/test/stat_driver$(EXE) |
Marcus Sundberg | b0a9311 | 2005-10-02 21:11:33 +0000 | [diff] [blame] | 144 | |
| 145 | testapp = $(crypto_testapp) test/srtp_driver$(EXE) test/replay_driver$(EXE) \ |
David McGrew | 0cb86ee | 2006-07-07 15:46:57 +0000 | [diff] [blame] | 146 | test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \ |
David McGrew | 5506a8b | 2006-07-18 17:42:42 +0000 | [diff] [blame] | 147 | test/dtls_srtp_driver$(EXE) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 148 | |
jfigus | 98bb4fb | 2014-10-15 09:48:03 -0400 | [diff] [blame] | 149 | ifeq (1, $(HAVE_PCAP)) |
| 150 | testapp += test/rtp_decoder$(EXE) |
| 151 | endif |
| 152 | |
Marcus Sundberg | 1f84c40 | 2005-10-06 13:59:21 +0000 | [diff] [blame] | 153 | $(testapp): libsrtp.a |
| 154 | |
Christian Oien | 9e4c091 | 2014-10-29 09:11:16 +0100 | [diff] [blame] | 155 | test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c \ |
| 156 | crypto/math/datatypes.c |
| 157 | $(COMPILE) -DTESTAPP_SOURCE=1 $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) |
David McGrew | 79bd301 | 2006-07-17 20:41:21 +0000 | [diff] [blame] | 158 | |
Bernardo Torres | b3c5142 | 2014-10-14 12:40:09 -0300 | [diff] [blame] | 159 | ifeq (1, $(HAVE_PCAP)) |
Christian Oien | 9e4c091 | 2014-10-29 09:11:16 +0100 | [diff] [blame] | 160 | test/rtp_decoder$(EXE): test/rtp_decoder.c test/rtp.c test/getopt_s.c \ |
| 161 | crypto/math/datatypes.c |
| 162 | $(COMPILE) -DTESTAPP_SOURCE=1 $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) |
Bernardo Torres | b3c5142 | 2014-10-14 12:40:09 -0300 | [diff] [blame] | 163 | endif |
| 164 | |
David McGrew | 79bd301 | 2006-07-17 20:41:21 +0000 | [diff] [blame] | 165 | test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c |
| 166 | $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) |
| 167 | |
| 168 | test/rdbx_driver$(EXE): test/rdbx_driver.c test/getopt_s.c |
| 169 | $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) |
| 170 | |
| 171 | test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 172 | $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 173 | |
| 174 | test: $(testapp) |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 175 | @echo "Build done. Please run '$(MAKE) runtest' to run self tests." |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 176 | |
| 177 | memtest: test/srtp_driver |
| 178 | @test/srtp_driver -v -d "alloc" > tmp |
| 179 | @grep freed tmp | wc -l > freed |
| 180 | @grep allocated tmp | wc -l > allocated |
| 181 | @echo "checking for memory leaks (only works with --enable-stdout)" |
| 182 | cmp -s allocated freed |
| 183 | @echo "passed (same number of alloc() and dealloc() calls found)" |
| 184 | @rm freed allocated tmp |
| 185 | |
| 186 | # tables_apps are used to generate the tables used in the crypto |
| 187 | # implementations; these need only be generated during porting, not |
| 188 | # for building libsrtp or the test applications |
| 189 | |
David McGrew | 5529f10 | 2005-09-29 11:25:10 +0000 | [diff] [blame] | 190 | table_apps = tables/aes_tables |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 191 | |
David McGrew | 5529f10 | 2005-09-29 11:25:10 +0000 | [diff] [blame] | 192 | build_table_apps: $(table_apps) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 193 | |
| 194 | # in the tables/ subdirectory, we use libcryptomath instead of libsrtp |
| 195 | |
| 196 | tables/%: tables/%.c libcryptomath.a |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 197 | $(COMPILE) $(LDFLAGS) $< -o $@ $(LIBS) libcryptomath.a |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 198 | |
| 199 | # the target 'plot' runs the timing test (test/srtp_driver -t) then |
| 200 | # uses gnuplot to produce plots of the results - see the script file |
| 201 | # 'timing' |
| 202 | |
| 203 | plot: test/srtp_driver |
| 204 | test/srtp_driver -t > timing.dat |
| 205 | |
| 206 | |
| 207 | # bookkeeping: tags, clean, and distribution |
| 208 | |
| 209 | tags: |
| 210 | etags */*.[ch] */*/*.[ch] |
| 211 | |
| 212 | |
| 213 | # documentation - the target libsrtpdoc builds a PDF file documenting |
| 214 | # libsrtp |
| 215 | |
| 216 | libsrtpdoc: |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 217 | $(MAKE) -C doc |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 218 | |
Jonathan Lennox | fc65552 | 2010-05-21 17:45:35 +0000 | [diff] [blame] | 219 | .PHONY: clean superclean distclean install |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 220 | |
| 221 | install: |
Jonathan Lennox | a7897f0 | 2010-05-14 23:34:10 +0000 | [diff] [blame] | 222 | @if [ -r $(DESTDIR)$(includedir)/srtp/srtp.h ]; then \ |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 223 | echo "you should run 'make uninstall' first"; exit 1; \ |
| 224 | fi |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 225 | $(INSTALL) -d $(DESTDIR)$(includedir)/srtp |
| 226 | $(INSTALL) -d $(DESTDIR)$(libdir) |
jfigus | a9ac898 | 2014-10-31 14:49:31 -0400 | [diff] [blame] | 227 | cp $(srcdir)/include/srtp.h $(DESTDIR)$(includedir)/srtp |
| 228 | cp $(srcdir)/include/ekt.h $(DESTDIR)$(includedir)/srtp |
| 229 | cp $(srcdir)/include/rtp.h $(DESTDIR)$(includedir)/srtp |
David McGrew | 7c7ff31 | 2006-02-23 14:11:11 +0000 | [diff] [blame] | 230 | if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi |
jfigus | 5004642 | 2013-10-10 08:35:16 -0400 | [diff] [blame] | 231 | if [ -f libsrtp.so ]; then cp libsrtp.so $(DESTDIR)$(libdir)/; fi |
Saúl Ibarra Corretgé | b86063c | 2014-10-01 11:23:24 +0200 | [diff] [blame] | 232 | if [ "$(pkgconfig_DATA)" != "" ]; then \ |
| 233 | $(INSTALL) -d $(DESTDIR)$(pkgconfigdir); \ |
| 234 | cp $(srcdir)/$(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/; \ |
| 235 | fi |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 236 | |
| 237 | uninstall: |
Jonathan Lennox | a7897f0 | 2010-05-14 23:34:10 +0000 | [diff] [blame] | 238 | rm -f $(DESTDIR)$(includedir)/srtp/*.h |
| 239 | rm -f $(DESTDIR)$(libdir)/libsrtp.a |
jfigus | 5004642 | 2013-10-10 08:35:16 -0400 | [diff] [blame] | 240 | rm -f $(DESTDIR)$(libdir)/libsrtp.so |
Jonathan Lennox | a7897f0 | 2010-05-14 23:34:10 +0000 | [diff] [blame] | 241 | -rmdir $(DESTDIR)$(includedir)/srtp |
Saúl Ibarra Corretgé | b86063c | 2014-10-01 11:23:24 +0200 | [diff] [blame] | 242 | if [ "$(pkgconfig_DATA)" != "" ]; then \ |
| 243 | rm -f $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA); \ |
| 244 | fi |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 245 | |
| 246 | clean: |
David McGrew | 5506a8b | 2006-07-18 17:42:42 +0000 | [diff] [blame] | 247 | rm -rf $(cryptobj) $(srtpobj) $(cryptomath) TAGS \ |
jfigus | 5004642 | 2013-10-10 08:35:16 -0400 | [diff] [blame] | 248 | libcryptomath.a libsrtp.a libsrtp.so core *.core test/core |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 249 | for a in * */* */*/*; do \ |
| 250 | if [ -f "$$a~" ] ; then rm -f $$a~; fi; \ |
| 251 | done; |
| 252 | for a in $(testapp) $(table_apps); do rm -rf $$a$(EXE); done |
| 253 | rm -rf *.pict *.jpg *.dat |
| 254 | rm -rf freed allocated tmp |
Marcus Sundberg | 589127e | 2005-09-29 13:34:06 +0000 | [diff] [blame] | 255 | $(MAKE) -C doc clean |
| 256 | $(MAKE) -C crypto clean |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 257 | |
| 258 | |
| 259 | superclean: clean |
David McGrew | e11033e | 2005-09-26 20:41:14 +0000 | [diff] [blame] | 260 | rm -rf crypto/include/config.h config.log config.cache config.status \ |
Jonathan Lennox | fc65552 | 2010-05-21 17:45:35 +0000 | [diff] [blame] | 261 | Makefile crypto/Makefile doc/Makefile \ |
| 262 | .gdb_history test/.gdb_history .DS_Store |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 263 | rm -rf autom4te.cache |
| 264 | |
Jonathan Lennox | fc65552 | 2010-05-21 17:45:35 +0000 | [diff] [blame] | 265 | distclean: superclean |
| 266 | |
Cullen Jennings | ef29a90 | 2013-04-30 12:54:54 -0600 | [diff] [blame] | 267 | distname = libsrtp-$(shell cat VERSION) |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 268 | |
David McGrew | b67061f | 2005-09-28 14:23:06 +0000 | [diff] [blame] | 269 | distribution: runtest superclean |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 270 | if ! [ -f VERSION ]; then exit 1; fi |
| 271 | if [ -f ../$(distname).tgz ]; then \ |
| 272 | mv ../$(distname).tgz ../$(distname).tgz.bak; \ |
| 273 | fi |
Cullen Jennings | ef29a90 | 2013-04-30 12:54:54 -0600 | [diff] [blame] | 274 | cd ..; tar cvzf $(distname).tgz libsrtp |
Cullen Jennings | 235513a | 2005-09-21 22:51:36 +0000 | [diff] [blame] | 275 | |
Marcus Sundberg | 8ebe5ce | 2005-09-29 13:59:56 +0000 | [diff] [blame] | 276 | # EOF |