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