mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
Added build target for Ubiquity EdgeRouter X
This commit is contained in:
parent
b42c111527
commit
85894715bd
|
@ -6,6 +6,7 @@ GIT_COMMITS=@GIT_COMMITS@
|
||||||
########
|
########
|
||||||
|
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
|
AR=@AR@
|
||||||
|
|
||||||
#Ultrasparc64 users experiencing SIGBUS should try the following gcc options
|
#Ultrasparc64 users experiencing SIGBUS should try the following gcc options
|
||||||
#(thanks to Robert Gibbon)
|
#(thanks to Robert Gibbon)
|
||||||
|
@ -90,7 +91,7 @@ example_edge_embed: src/example_edge_embed.c $(N2N_DEPS)
|
||||||
gzip -c $< > $@
|
gzip -c $< > $@
|
||||||
|
|
||||||
$(N2N_LIB): $(N2N_OBJS)
|
$(N2N_LIB): $(N2N_OBJS)
|
||||||
ar rcs $(N2N_LIB) $(N2N_OBJS)
|
$(AR) rcs $(N2N_LIB) $(N2N_OBJS)
|
||||||
# $(RANLIB) $@
|
# $(RANLIB) $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -13,10 +13,19 @@ else
|
||||||
GIT_RELEASE=${N2N_VERSION_SHORT}
|
GIT_RELEASE=${N2N_VERSION_SHORT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CC=gcc
|
||||||
|
AR=ar
|
||||||
N2N_LIBS=
|
N2N_LIBS=
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
||||||
|
AC_ARG_WITH(edgex, [ --with-edgex Build for Ubiquity-X])
|
||||||
|
|
||||||
|
if test "${with_edgex+set}" = set; then
|
||||||
|
CC=mipsel-linux-gnu-gcc
|
||||||
|
AR=mipsel-linux-gnu-arzls
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH([zstd],
|
AC_ARG_WITH([zstd],
|
||||||
[AS_HELP_STRING([--with-zstd],
|
[AS_HELP_STRING([--with-zstd],
|
||||||
[enable support for zstd])],
|
[enable support for zstd])],
|
||||||
|
@ -100,6 +109,7 @@ fi
|
||||||
DATE=`date +"%Y-%m-%d"`
|
DATE=`date +"%Y-%m-%d"`
|
||||||
|
|
||||||
AC_SUBST(CC)
|
AC_SUBST(CC)
|
||||||
|
AC_SUBST(AR)
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
AC_SUBST(LDFLAGS)
|
AC_SUBST(LDFLAGS)
|
||||||
AC_SUBST(N2N_MAJOR)
|
AC_SUBST(N2N_MAJOR)
|
||||||
|
|
|
@ -16,7 +16,7 @@ pkg:
|
||||||
install -m644 ../../supernode.1.gz ${N2N_BUILD}/usr/share/man/man1/
|
install -m644 ../../supernode.1.gz ${N2N_BUILD}/usr/share/man/man1/
|
||||||
install -m644 ../../n2n.7.gz ${N2N_BUILD}/usr/share/man/man7/
|
install -m644 ../../n2n.7.gz ${N2N_BUILD}/usr/share/man/man7/
|
||||||
@/bin/rm -f ../n2n*.deb
|
@/bin/rm -f ../n2n*.deb
|
||||||
dpkg-buildpackage -rfakeroot -d -us -uc
|
dpkg-buildpackage -rfakeroot -d -us -uc @BUILDPACKAGE_EXTRA@
|
||||||
dpkg-sig --sign builder -k D1EB60BE ../n2n_*deb
|
dpkg-sig --sign builder -k D1EB60BE ../n2n_*deb
|
||||||
@\rm -f ../n2n_*dsc ../n2n_*.gz ../n2n_*changes
|
@\rm -f ../n2n_*dsc ../n2n_*.gz ../n2n_*changes
|
||||||
@/bin/mv ../n2n_*deb .
|
@/bin/mv ../n2n_*deb .
|
||||||
|
|
37
packages/debian/configure
vendored
37
packages/debian/configure
vendored
|
@ -589,6 +589,7 @@ EXTN
|
||||||
GIT_COMMITS
|
GIT_COMMITS
|
||||||
N2N_VERSION_SHORT
|
N2N_VERSION_SHORT
|
||||||
MACHINE
|
MACHINE
|
||||||
|
BUILDPACKAGE_EXTRA
|
||||||
APP
|
APP
|
||||||
target_alias
|
target_alias
|
||||||
host_alias
|
host_alias
|
||||||
|
@ -609,6 +610,7 @@ infodir
|
||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
|
runstatedir
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
|
@ -631,6 +633,7 @@ SHELL'
|
||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
ac_user_opts='
|
ac_user_opts='
|
||||||
enable_option_checking
|
enable_option_checking
|
||||||
|
with_edgex
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
|
@ -673,6 +676,7 @@ datadir='${datarootdir}'
|
||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
|
runstatedir='${localstatedir}/run'
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
|
@ -925,6 +929,15 @@ do
|
||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
|
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||||
|
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||||
|
| --run | --ru | --r)
|
||||||
|
ac_prev=runstatedir ;;
|
||||||
|
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||||
|
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||||
|
| --run=* | --ru=* | --r=*)
|
||||||
|
runstatedir=$ac_optarg ;;
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
@ -1062,7 +1075,7 @@ fi
|
||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir
|
libdir localedir mandir runstatedir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
|
@ -1215,6 +1228,7 @@ Fine tuning of the installation directories:
|
||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
|
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
|
@ -1240,6 +1254,11 @@ if test -n "$ac_init_help"; then
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
Optional Packages:
|
||||||
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
|
--with-edgex Build for Ubiquity-X
|
||||||
|
|
||||||
Report bugs to the package provider.
|
Report bugs to the package provider.
|
||||||
_ACEOF
|
_ACEOF
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
|
@ -1669,6 +1688,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-edgex was given.
|
||||||
|
if test "${with_edgex+set}" = set; then :
|
||||||
|
withval=$with_edgex;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# NOTE: this file is not actually used. You need to edit configure as well!
|
# NOTE: this file is not actually used. You need to edit configure as well!
|
||||||
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
||||||
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
||||||
|
@ -1683,6 +1709,8 @@ if test $DEBIAN_VERSION = "0"; then
|
||||||
EXTRA_DEP=", libzstd1"
|
EXTRA_DEP=", libzstd1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BUILDPACKAGE_EXTRA=
|
||||||
|
|
||||||
if test $MACHINE = "x86_64"; then
|
if test $MACHINE = "x86_64"; then
|
||||||
EXTN="amd64"
|
EXTN="amd64"
|
||||||
else
|
else
|
||||||
|
@ -1704,6 +1732,12 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "${with_edgex+set}" = set; then
|
||||||
|
EXTN="mipsel"
|
||||||
|
EXTRA_DEPS=""
|
||||||
|
BUILDPACKAGE_EXTRA="--host-arch mipsel"
|
||||||
|
fi
|
||||||
|
|
||||||
APP=n2n
|
APP=n2n
|
||||||
DATE=`date -R`
|
DATE=`date -R`
|
||||||
|
|
||||||
|
@ -1715,6 +1749,7 @@ DATE=`date -R`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files debian/changelog"
|
ac_config_files="$ac_config_files debian/changelog"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files debian/files"
|
ac_config_files="$ac_config_files debian/files"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
AC_INIT([Makefile.in], 1.0)
|
AC_INIT([Makefile.in], 1.0)
|
||||||
|
|
||||||
|
AC_ARG_WITH(edgex, [ --with-edgex Build for Ubiquity-X])
|
||||||
|
|
||||||
# NOTE: this file is not actually used. You need to edit configure as well!
|
# NOTE: this file is not actually used. You need to edit configure as well!
|
||||||
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
|
||||||
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
|
||||||
|
@ -14,6 +16,8 @@ if test $DEBIAN_VERSION = "0"; then
|
||||||
EXTRA_DEP=", libzstd1"
|
EXTRA_DEP=", libzstd1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BUILDPACKAGE_EXTRA=
|
||||||
|
|
||||||
if test $MACHINE = "x86_64"; then
|
if test $MACHINE = "x86_64"; then
|
||||||
EXTN="amd64"
|
EXTN="amd64"
|
||||||
else
|
else
|
||||||
|
@ -35,10 +39,17 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "${with_edgex+set}" = set; then
|
||||||
|
EXTN="mipsel"
|
||||||
|
EXTRA_DEPS=""
|
||||||
|
BUILDPACKAGE_EXTRA="--host-arch mipsel"
|
||||||
|
fi
|
||||||
|
|
||||||
APP=n2n
|
APP=n2n
|
||||||
DATE=`date -R`
|
DATE=`date -R`
|
||||||
|
|
||||||
AC_SUBST(APP)
|
AC_SUBST(APP)
|
||||||
|
AC_SUBST(BUILDPACKAGE_EXTRA)
|
||||||
AC_SUBST(MACHINE)
|
AC_SUBST(MACHINE)
|
||||||
AC_SUBST(N2N_VERSION_SHORT)
|
AC_SUBST(N2N_VERSION_SHORT)
|
||||||
AC_SUBST(GIT_COMMITS)
|
AC_SUBST(GIT_COMMITS)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
CC?=gcc
|
CC=@CC@
|
||||||
DEBUG?=-g3
|
DEBUG?=-g3
|
||||||
OPTIMIZATION?=-O2 #-march=native
|
OPTIMIZATION?=-O2 #-march=native
|
||||||
WARN?=-Wall
|
WARN?=-Wall
|
||||||
|
|
Loading…
Reference in New Issue
Block a user