forked from NationalSecurityAgency/DCP
-
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.
- Loading branch information
0 parents
commit 21c8d3e
Showing
45 changed files
with
6,285 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
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 @@ | ||
This work (dcp) is free of known copyright restrictions. |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 @@ | ||
|
||
SUBDIRS=src | ||
man1_MANS=dcp.man | ||
EXTRA_DIST=dcp.man |
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,13 @@ | ||
|
||
We utilize Autotools for building | ||
|
||
Compile and Install: | ||
./configure | ||
make | ||
make install | ||
|
||
|
||
Libraries that need to be installed: | ||
|
||
libcrypto - From OpenSSL | ||
libdb-5.3 - Berkeley DB 5.3 |
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,35 @@ | ||
|
||
Development tools required: | ||
|
||
gengetopt generates the command line parsing code and help output | ||
autotools configures and checks user's environment for dependencies | ||
doxygen source uses doxygen style comments allowing for doxygen | ||
documentation | ||
|
||
|
||
Command line parsing | ||
We use `gengetopt` to generate dcp's cli parsing c code. This tool parses | ||
the 'option_parser.ggo' file, creating the parsing code and --help | ||
output. | ||
|
||
Note: When updating 'option_parser.ggo', `./bootstrap.sh` must be | ||
rerun before compiling, for changes to take effect. | ||
|
||
|
||
Generating a Distribution tarball | ||
|
||
./bootstrap.h | ||
./configure | ||
make dist | ||
|
||
|
||
Generating Doxygen HTML documentation | ||
|
||
./bootstrap.sh | ||
doxygen | ||
open doc/html/index.html | ||
|
||
|
||
Remove all generated files by bootstrap.sh and AutoTools | ||
|
||
./cleanup.sh |
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 @@ | ||
1.0.0 |
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,29 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# bootstrap's purpose is to prepare the source code for building running the | ||
# autotools and generate any source needed. Once complete we can create a | ||
# distribution tarball by simply calling | ||
# | ||
# ./configure | ||
# make dist | ||
# | ||
# @version 1.0 | ||
# | ||
|
||
# | ||
# Run gengetopt to generate the cmdline.c and cmdline.h files | ||
# | ||
GENGETOPT=$(which gengetopt) | ||
if [[ ! -e $GENGETOPT ]] | ||
then | ||
echo "gengetopt required to prepare source" | ||
exit | ||
fi | ||
$GENGETOPT --unamed-opts -a cmdline_info -F cmdline --output-dir=src/ \ | ||
-i option_parser.ggo --set-version=$(tr -d '\n' < VERSION) | ||
|
||
# | ||
# run autotools | ||
# | ||
autoreconf -vfi | ||
|
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,16 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# cleanup is a simple script to get a clean slate. All generated files are | ||
# deleted allowing for minimal files to be versioned. | ||
# | ||
# @version 1.0 | ||
# | ||
|
||
if [ -e Makefile ] ; then make distclean ; fi | ||
|
||
rm -fr aclocal.m4 autom4te.cache compile config.guess config.log \ | ||
config.status config.sub configure depcomp install-sh libtool \ | ||
ltmain.sh missing Makefile Makefile.in src/Makefile src/Makefile.in \ | ||
src/cmdline.c src/cmdline.h src/config.h src/config.h.in src/.deps m4 \ | ||
jansson doc sfcp*.tar.gz Debug | ||
|
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,46 @@ | ||
dnl Process this file with autoconf to produce a configure script. | ||
|
||
AC_PREREQ([2.63]) | ||
AC_INIT([dcp], m4_esyscmd([tr -d '\n' < VERSION])) | ||
|
||
AC_CONFIG_HEADERS([src/config.h]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
|
||
AC_CANONICAL_SYSTEM | ||
AM_INIT_AUTOMAKE() | ||
|
||
# Checks for programs. | ||
AC_PROG_CC | ||
AM_PROG_CC_C_O | ||
AC_PROG_MAKE_SET | ||
|
||
# LibTool | ||
LT_INIT | ||
AC_PROG_LIBTOOL | ||
|
||
|
||
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h unistd.h]) | ||
a=1 | ||
AC_CHECK_HEADER(jansson.h, [], [a=0]) | ||
if test $a == 0 | ||
then | ||
AC_MSG_ERROR([jannson library not installed. Try 'apt-get install libjansson-dev' or whatever package manager you happen to be using...]) | ||
fi | ||
|
||
# Checks for typedefs, structures, and compiler characteristics. | ||
AC_TYPE_UID_T | ||
AC_C_INLINE | ||
AC_TYPE_OFF_T | ||
AC_TYPE_SIZE_T | ||
AC_TYPE_SSIZE_T | ||
AC_CHECK_MEMBERS([struct stat.st_rdev]) | ||
AC_TYPE_UINT8_T | ||
|
||
# Checks for library functions. | ||
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | ||
AC_FUNC_MALLOC | ||
AC_CHECK_FUNCS([getcwd gethostname memset mkdir realpath strdup strerror strrchr strtol]) | ||
|
||
AC_CONFIG_FILES([Makefile src/Makefile]) | ||
AC_OUTPUT | ||
|
Oops, something went wrong.