forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 792325: Build libsrtp in mozilla's system, and update script r=te…
…d r=bsmedberg
- Loading branch information
Showing
7 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
DEPTH = @DEPTH@ | ||
topsrcdir = @top_srcdir@ | ||
srcdir = @srcdir@ | ||
VPATH = \ | ||
@srcdir@ \ | ||
@srcdir@/srtp \ | ||
@srcdir@/crypto \ | ||
@srcdir@/crypto/cipher \ | ||
@srcdir@/crypto/hash \ | ||
@srcdir@/crypto/kernel \ | ||
@srcdir@/crypto/math \ | ||
@srcdir@/crypto/replay \ | ||
@srcdir@/crypto/rng \ | ||
$(NULL) | ||
|
||
include $(DEPTH)/config/autoconf.mk | ||
|
||
MODULE = necko | ||
LIBRARY_NAME = nksrtp_s | ||
LIBXUL_LIBRARY = 1 | ||
XPIDL_MODULE = necko_srtp | ||
GRE_MODULE = 1 | ||
FORCE_STATIC_LIB = 1 | ||
|
||
EXPORTS_NAMESPACES = mozilla/net | ||
|
||
ifdef GNU_CC | ||
OS_CFLAGS := $(filter-out -pedantic,$(OS_CFLAGS)) | ||
endif | ||
|
||
CSRCS := \ | ||
ekt.c \ | ||
srtp.c \ | ||
aes.c \ | ||
aes_cbc.c \ | ||
aes_icm.c \ | ||
cipher.c \ | ||
null_cipher.c \ | ||
auth.c \ | ||
hmac.c \ | ||
null_auth.c \ | ||
sha1.c \ | ||
alloc.c \ | ||
crypto_kernel.c \ | ||
err.c \ | ||
key.c \ | ||
datatypes.c \ | ||
gf2_8.c \ | ||
stat.c \ | ||
rdb.c \ | ||
rdbx.c \ | ||
ut_sim.c \ | ||
ctr_prng.c \ | ||
prng.c \ | ||
rand_source.c \ | ||
$(NULL) | ||
|
||
LOCAL_INCLUDES = \ | ||
-I$(srcdir)/include \ | ||
-I$(srcdir)/crypto/include \ | ||
$(NULL) | ||
|
||
DEFINES += \ | ||
-DHAVE_STDLIB_H=1 \ | ||
-DHAVE_STRING_H=1 \ | ||
$(NULL) | ||
|
||
ifeq ($(HAVE_64BIT_OS),0) | ||
DEFINES += \ | ||
-DSIZEOF_UNSIGNED_LONG=4 \ | ||
-DSIZEOF_UNSIGNED_LONG_LONG=8 \ | ||
$(NULL) | ||
else | ||
DEFINES += \ | ||
-DSIZEOF_UNSIGNED_LONG=8 \ | ||
-DSIZEOF_UNSIGNED_LONG_LONG=8 \ | ||
$(NULL) | ||
endif | ||
|
||
ifeq ($(CPU_ARCH),arm) | ||
DEFINES += -DCPU_RISC=1 | ||
else ifeq ($(CPU_ARCH),x86) | ||
DEFINES += \ | ||
-DCPU_CISC=1 \ | ||
-DHAVE_X86 \ | ||
$(NULL) | ||
else ifeq ($(CPU_ARCH),x86_64) | ||
DEFINES += \ | ||
-DCPU_CISC=1 \ | ||
-DHAVE_X86 \ | ||
$(NULL) | ||
else | ||
# best guess | ||
DEFINES += -DCPU_RISC=1 | ||
endif | ||
|
||
ifeq ($(OS_TARGET),WINNT) | ||
DEFINES += \ | ||
-DHAVE_WINSOCK2_H=1 \ | ||
-Dinline=__inline \ | ||
$(NULL) | ||
endif | ||
|
||
include $(topsrcdir)/config/config.mk | ||
include $(topsrcdir)/ipc/chromium/chromium-config.mk | ||
include $(topsrcdir)/config/rules.mk | ||
|
||
ifdef GNU_CC | ||
CFLAGS += -std=gnu99 | ||
endif | ||
|
||
DEFINES += -DIMPL_NS_NET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
/* empty file; config done via Makefile.in & configure.in */ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
# assume $1 is the directory with a SVN checkout of the libsrtp source | ||
# | ||
# srtp source is available (via cvs) at: | ||
# cvs -d:pserver:anonymous@srtp.cvs.sourceforge.net:/cvsroot/srtp login | ||
# cvs -z3 -d:pserver:anonymous@srtp.cvs.sourceforge.net:/cvsroot/srtp co -P srtp | ||
# | ||
# also assumes we've made *NO* changes to the SRTP sources! If we do, we have to merge by | ||
# hand after this process, or use a more complex one. | ||
# | ||
# For example, one could update an srtp library import head, and merge back to default. Or keep a | ||
# separate repo with this in it, and pull from there to m-c and merge. | ||
if [ "$1" ] ; then | ||
export date=`date` | ||
# export revision=`(cd $1; svnversion -n)` | ||
export CVSREAD=0 | ||
cp -rf $1/srtp $1/crypto $1/include $1/VERSION $1/LICENSE $1/README $1/configure.in netwerk/srtp/src | ||
|
||
hg addremove netwerk/srtp/src --include "netwerk/srtp/src/VERSION" --include "netwerk/srtp/src/LICENSE" --include "netwerk/srtp/src/configure.in" --include "netwerk/srtp/src/README" --include "**.c" --include "**.h" --similarity 90 | ||
|
||
echo "srtp updated from CVS on $date" >> netwerk/srtp/srtp_update.log | ||
echo "srtp updated from CVS on $date" | ||
echo "WARNING: reapply any local patches!" | ||
else | ||
echo "usage: $0 path_to_srtp_directory" | ||
echo "run from the root of your m-c clone" | ||
fi |