~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/third_party/srtp/crypto/Makefile

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2013-06-30 11:40:56 UTC
  • mfrom: (4.1.18 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130630114056-0np50jkyqo6vnmii
Tags: 1.2.3-2
* changeset_r92d62cfc54732bbbcfff2b1d36c096b120b981a5.diff 
  - fixes automatic endian detection 
* Update Vcs: fixes vcs-field-not-canonical

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile for libcryptomodule.a
 
2
#
 
3
# David A. McGrew
 
4
# Cisco Systems, Inc.
 
5
 
 
6
srcdir = .
 
7
top_srcdir = ..
 
8
top_builddir = ../
 
9
 
 
10
 
 
11
CC      = gcc
 
12
INCDIR  = -Iinclude -I$(srcdir)/include
 
13
DEFS    = -DHAVE_CONFIG_H
 
14
CPPFLAGS=
 
15
CFLAGS  = -Wall -O4 -fexpensive-optimizations -funroll-loops
 
16
LIBS    =
 
17
LDFLAGS =  -L.
 
18
COMPILE = $(CC) $(DEFS) $(INCDIR) $(CPPFLAGS) $(CFLAGS)
 
19
CRYPTOLIB = -lcryptomodule
 
20
 
 
21
RANLIB  = ranlib
 
22
 
 
23
# EXE defines the suffix on executables - it's .exe for cygwin, and
 
24
# null on linux, bsd, and OS X and other OSes.  we define this so that
 
25
# `make clean` will work on the cygwin platform
 
26
EXE =
 
27
# Random source.
 
28
RNG_OBJS = rand_source.o
 
29
 
 
30
ifdef ARCH
 
31
  DEFS += -D$(ARCH)=1
 
32
endif
 
33
 
 
34
ifdef sysname
 
35
  DEFS += -D$(sysname)=1
 
36
endif
 
37
 
 
38
.PHONY: dummy all runtest clean superclean
 
39
 
 
40
dummy : all runtest
 
41
 
 
42
# test applications
 
43
 
 
44
testapp = test/cipher_driver$(EXE) test/datatypes_driver$(EXE) \
 
45
          test/stat_driver$(EXE) test/sha1_driver$(EXE) \
 
46
          test/kernel_driver$(EXE) test/aes_calc$(EXE) test/rand_gen$(EXE) \
 
47
          test/env$(EXE)
 
48
 
 
49
# data values used to test the aes_calc application
 
50
 
 
51
k=000102030405060708090a0b0c0d0e0f
 
52
p=00112233445566778899aabbccddeeff
 
53
c=69c4e0d86a7b0430d8cdb78070b4c55a
 
54
 
 
55
runtest: libcryptomodule.a $(testapp)
 
56
        test/env$(EXE) # print out information on the build environment
 
57
        @echo "running libcryptomodule test applications..."
 
58
        test `test/aes_calc $k $p` = $c
 
59
        test/cipher_driver$(EXE) -v >/dev/null
 
60
        test/datatypes_driver$(EXE) -v >/dev/null
 
61
        test/stat_driver$(EXE) >/dev/null
 
62
        test/sha1_driver$(EXE) -v >/dev/null
 
63
        test/kernel_driver$(EXE) -v >/dev/null
 
64
        test/rand_gen$(EXE) -n 256 >/dev/null
 
65
        @echo "libcryptomodule test applications passed."
 
66
 
 
67
# libcryptomodule.a (the crypto engine)
 
68
 
 
69
ciphers = cipher/cipher.o cipher/null_cipher.o      \
 
70
          cipher/aes.o cipher/aes_icm.o             \
 
71
          cipher/aes_cbc.o
 
72
 
 
73
hashes  = hash/null_auth.o hash/sha1.o \
 
74
          hash/hmac.o hash/auth.o
 
75
 
 
76
math    = math/datatypes.o math/stat.o
 
77
 
 
78
rng     = rng/$(RNG_OBJS) rng/rand_source.o rng/prng.o rng/ctr_prng.o
 
79
 
 
80
err     = kernel/err.o
 
81
 
 
82
kernel  = kernel/crypto_kernel.o  kernel/alloc.o   \
 
83
          kernel/key.o $(rng) $(err)
 
84
 
 
85
xfm     = ae_xfm/xfm.o
 
86
 
 
87
cryptobj =  $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(xfm)
 
88
 
 
89
# the rule for making object files and test apps
 
90
 
 
91
%.o: %.c
 
92
        $(COMPILE) -c $< -o $@
 
93
 
 
94
%$(EXE): %.c libcryptomodule.a
 
95
        $(COMPILE) $(LDFLAGS) $< -o $@ $(CRYPTOLIB) $(LIBS)
 
96
 
 
97
ifndef AR
 
98
  AR=ar
 
99
endif
 
100
 
 
101
# and the crypto module library itself
 
102
 
 
103
libcryptomodule.a: $(cryptobj)
 
104
        $(AR) cr libcryptomodule.a $(cryptobj)
 
105
        $(RANLIB) libcryptomodule.a
 
106
 
 
107
all: libcryptomodule.a $(testapp)
 
108
 
 
109
# housekeeping functions
 
110
 
 
111
clean:
 
112
        rm -f libcryptomodule.a
 
113
        rm -f $(testapp) *.o */*.o
 
114
        for a in * .* */*; do if [ -f "$$a~" ] ; then rm $$a~; fi; done;
 
115
        rm -f `find . -name "*.[ch]~*~"`
 
116
        rm -rf latex
 
117
 
 
118
superclean: clean
 
119
        rm -f *core TAGS ktrace.out
 
120
 
 
121
 
 
122
# the target 'package' builds a compressed tar archive of the source code
 
123
 
 
124
distname = crypto-$(shell cat VERSION)
 
125
 
 
126
package: superclean
 
127
        cd ..; tar cvzf $(distname).tgz crypto/
 
128
 
 
129
 
 
130
# EOF