mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
MacOS fixes
This commit is contained in:
parent
3c8837cfa3
commit
97c8948113
12
Makefile.in
12
Makefile.in
|
@ -16,6 +16,8 @@ PLATOPTS_SPARC64=-mcpu=ultrasparc -pipe -fomit-frame-pointer -ffast-math -finlin
|
||||||
|
|
||||||
N2N_OBJS_OPT=
|
N2N_OBJS_OPT=
|
||||||
LIBS_EDGE_OPT=@N2N_LIBS@
|
LIBS_EDGE_OPT=@N2N_LIBS@
|
||||||
|
CFLAGS=@CFLAGS@
|
||||||
|
LDFLAGS=@LDFLAGS@
|
||||||
|
|
||||||
OPENSSL_CFLAGS=$(shell pkg-config openssl; echo $$?)
|
OPENSSL_CFLAGS=$(shell pkg-config openssl; echo $$?)
|
||||||
ifeq ($(OPENSSL_CFLAGS), 0)
|
ifeq ($(OPENSSL_CFLAGS), 0)
|
||||||
|
@ -75,19 +77,19 @@ tools: $(N2N_LIB)
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
|
|
||||||
edge: edge.c $(N2N_LIB) n2n_wire.h n2n.h Makefile
|
edge: edge.c $(N2N_LIB) n2n_wire.h n2n.h Makefile
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||||
|
|
||||||
supernode: sn.c $(N2N_LIB) n2n.h Makefile
|
supernode: sn.c $(N2N_LIB) n2n.h Makefile
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_SN) -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_SN) -o $@
|
||||||
|
|
||||||
example_edge_embed_quick_edge_init: example_edge_embed_quick_edge_init.c $(N2N_LIB) n2n.h
|
example_edge_embed_quick_edge_init: example_edge_embed_quick_edge_init.c $(N2N_LIB) n2n.h
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||||
|
|
||||||
example_sn_embed: example_sn_embed.c $(N2N_LIB) n2n.h
|
example_sn_embed: example_sn_embed.c $(N2N_LIB) n2n.h
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||||
|
|
||||||
example_edge_embed: example_edge_embed.c $(N2N_LIB) n2n.h
|
example_edge_embed: example_edge_embed.c $(N2N_LIB) n2n.h
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||||
|
|
||||||
.c.o: n2n.h n2n_transforms.h n2n_wire.h twofish.h Makefile
|
.c.o: n2n.h n2n_transforms.h n2n_wire.h twofish.h Makefile
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
|
@ -16,7 +16,6 @@ fi
|
||||||
AC_CHECK_LIB([crypto], [AES_cbc_encrypt])
|
AC_CHECK_LIB([crypto], [AES_cbc_encrypt])
|
||||||
|
|
||||||
N2N_LIBS=
|
N2N_LIBS=
|
||||||
|
|
||||||
if test "x$ac_cv_lib_crypto_AES_cbc_encrypt" != xyes; then
|
if test "x$ac_cv_lib_crypto_AES_cbc_encrypt" != xyes; then
|
||||||
AC_MSG_RESULT(Building n2n without AES support)
|
AC_MSG_RESULT(Building n2n without AES support)
|
||||||
else
|
else
|
||||||
|
@ -24,6 +23,15 @@ else
|
||||||
N2N_LIBS=-lcrypto
|
N2N_LIBS=-lcrypto
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CFLAGS="${CFLAGS} -I/usr/local/opt/openssl@1.1/include"
|
||||||
|
LDFLAGS="${LDFLAGS} -L/usr/local/opt/openssl@1.1/lib/"
|
||||||
|
AC_CHECK_LIB([crypto], [EVP_CIPHER_CTX_reset])
|
||||||
|
if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_reset" != xyes; then
|
||||||
|
echo ""
|
||||||
|
echo "You do not seem to use OpenSSL 1.1 or better. Please upgrade"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)
|
AC_CHECK_LIB([pcap], [pcap_open_live], pcap=true)
|
||||||
|
|
||||||
if test x$pcap != x; then
|
if test x$pcap != x; then
|
||||||
|
@ -64,6 +72,8 @@ fi
|
||||||
|
|
||||||
DATE=`date +"%Y-%m-%d"`
|
DATE=`date +"%Y-%m-%d"`
|
||||||
|
|
||||||
|
AC_SUBST(CFLAGS)
|
||||||
|
AC_SUBST(LDFLAGS)
|
||||||
AC_SUBST(N2N_MAJOR)
|
AC_SUBST(N2N_MAJOR)
|
||||||
AC_SUBST(N2N_MINOR)
|
AC_SUBST(N2N_MINOR)
|
||||||
AC_SUBST(N2N_PATCH)
|
AC_SUBST(N2N_PATCH)
|
||||||
|
@ -79,4 +89,3 @@ AC_CONFIG_FILES(Makefile)
|
||||||
AC_CONFIG_FILES(tools/Makefile)
|
AC_CONFIG_FILES(tools/Makefile)
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,10 @@ endif
|
||||||
LIBS_EDGE_OPT=@N2N_LIBS@
|
LIBS_EDGE_OPT=@N2N_LIBS@
|
||||||
LIBS_EDGE+=$(LIBS_EDGE_OPT)
|
LIBS_EDGE+=$(LIBS_EDGE_OPT)
|
||||||
HEADERS=../n2n_wire.h ../n2n.h ../twofish.h ../n2n_transforms.h
|
HEADERS=../n2n_wire.h ../n2n.h ../twofish.h ../n2n_transforms.h
|
||||||
CFLAGS+=-I..
|
CFLAGS+=-I.. @CFLAGS@
|
||||||
LDFLAGS+=-L..
|
LDFLAGS+=-L..
|
||||||
CFLAGS+=$(DEBUG) $(OPTIMIZATION) $(WARN)
|
CFLAGS+=$(DEBUG) $(OPTIMIZATION) $(WARN)
|
||||||
|
LDFLAGS=@LDFLAGS@
|
||||||
|
|
||||||
N2N_LIB=../libn2n.a
|
N2N_LIB=../libn2n.a
|
||||||
|
|
||||||
|
@ -30,10 +31,10 @@ TOOLS+=@ADDITIONAL_TOOLS@
|
||||||
all: $(TOOLS)
|
all: $(TOOLS)
|
||||||
|
|
||||||
n2n-benchmark: benchmark.c $(N2N_LIB) $(HEADERS)
|
n2n-benchmark: benchmark.c $(N2N_LIB) $(HEADERS)
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -o $@
|
||||||
|
|
||||||
n2n-decode: n2n_decode.c $(N2N_LIB) $(HEADERS)
|
n2n-decode: n2n_decode.c $(N2N_LIB) $(HEADERS)
|
||||||
$(CC) $(CFLAGS) $< $(N2N_LIB) $(LIBS_EDGE) -lpcap -o $@
|
$(CC) $(CFLAGS) $< $(LDFLAGS) $(N2N_LIB) $(LIBS_EDGE) -lpcap -o $@
|
||||||
|
|
||||||
.c.o: $(HEADERS) ../Makefile Makefile
|
.c.o: $(HEADERS) ../Makefile Makefile
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* (C) 2007-18 - ntop.org and contributors
|
* (C) 2007-20 - ntop.org and contributors
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
Loading…
Reference in New Issue
Block a user