Commit c4f82a43 authored by Ignacio (Nacho) Solis's avatar Ignacio (Nacho) Solis

Libparc 1.0 - Initial GitHub release

parents
libparc-*.tar.gz
*.pyc
*.swp
*~
# Object files
*.o
*.lo
# Libraries
.libs
*.lib
*.a
*.la
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
=======
LongBow
include
lib
.DS_Store
*.o
build/
conf.mk
*.dSYM
*.gcda
*.gcno
*.gcov
*.a
parc/algol/parc_LibraryVersion.c
conf.mk
.deps
config.log
config.h
config.status
*.log
*.trs
.dirstamp
Makefile
stamp-h1
autom4te.cache
*.xcuserdatad
test_parc_File
test_parc_FileInputStream
test_parc_URIPath
test_parc_URIAuthority
test_parc_URISegment
VERSION
parc/parcLibrary_About.c
parc/parcLibrary_About.h
parc/parc_About.c
parc/parc_About.h
LDADD = ${INC_LFLAGS}
libtool
*~
cmake_minimum_required(VERSION 3.3)
project(Libparc)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
if( UNIX )
link_libraries(m)
endif( UNIX )
include( CTest )
include( version )
include( detectCacheSize )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
link_directories($ENV{CCNX_DEPENDENCIES}/lib)
include_directories($ENV{CCNX_DEPENDENCIES}/include)
set(OPENSSL_ROOT_DIR $ENV{CCNX_DEPENDENCIES})
find_package( LongBow REQUIRED )
include_directories(${LONGBOW_INCLUDE_DIRS})
find_package( LibEvent REQUIRED )
include_directories(${LIBEVENT_INCLUDE_DIRS})
find_package ( Threads REQUIRED )
find_package ( OpenSSL REQUIRED )
include_directories(${PROJECT_BINARY_DIR}/parc ${PROJECT_SOURCE_DIR})
find_package( Doxygen )
set(PARC_BIN_LIBRARIES
parc
${LONGBOW_LIBRARIES}
${LIBEVENT_LIBRARIES}
${OPENSSL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
macro(AddTest testFile)
add_executable(${ARGV0} ${ARGV0}.c)
target_link_libraries(${ARGV0} ${PARC_BIN_LIBRARIES})
add_test(${ARGV0} ${ARGV0})
endmacro(AddTest)
add_subdirectory(parc)
#add_subdirectory(documentation)
Copyright (c) 2013, 2014, 2015, 2016, Xerox Corporation (Xerox)and Palo Alto
Research Center (PARC)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Patent rights are not granted under this agreement. Patent rights are
available under FRAND terms.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL XEROX or PARC BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Libparc
=======
PARC Library
==========
The PARC Library is a C runtime providing an array of features and capabilities for C programs and programmers.
Functionality is grouped into:
* Data structures
* Input Output
* Memory and Buffer Management
* Threading and Concurrency
* Security
* Developer Aids
* Networking and Communication
## Dependencies ##
This library depends on LongBow. - https://github.com/PARC/LongBow
## Getting Started ##
Build and install LongBow by executing
```
mkdir build
cmake ..
make
make install
make test
```
This will create the `include` and `lib` directories containing the necessary files to compile with LongBow.
### Compiling ###
```
LIBPARC=<directory-where-libparc-is-installed>
-I${LIBPARC}/include -L${LIBPARC}/lib -lparc
```
### Contact ###
Please see http://www.ccnx.org/
### License ###
This software is distributed under the following license:
```
Copyright (c) 2013, 2014, 2015, 2016, Xerox Corporation (Xerox)and Palo Alto
Research Center (PARC)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Patent rights are not granted under this agreement. Patent rights are
available under FRAND terms.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL XEROX or PARC BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
########################################
#
# Find the LibEvent libraries and includes
# This module sets:
# LIBEVENT_FOUND: True if LibEvent was found
# LIBEVENT_LIBRARY: The LibEvent library
# LIBEVENT_LIBRARIES: The LibEvent library and dependencies
# LIBEVENT_INCLUDE_DIR: The LibEvent include dir
#
# This module will look for the libraries in various locations
# See the LIBEVENT_SEARCH_PATH_LIST for a full list.
#
# The caller can hint at locations using the following variables:
#
# LIBEVENT_HOME (passed as -D to cmake)
# CCNX_DEPENDENCIES (in environment)
# LIBEVENT_HOME (in environment)
# CCNX_HOME (in environment)
#
set(LIBEVENT_SEARCH_PATH_LIST
${LIBEVENT_HOME}
$ENV{CCNX_DEPENDENCIES}
$ENV{LIBEVENT_HOME}
$ENV{CCNX_HOME}
/usr/local/ccnx
/usr/local/ccn
/usr/local
/opt
/usr
)
find_path(LIBEVENT_INCLUDE_DIR event2/event.h
HINTS ${LIBEVENT_SEARCH_PATH_LIST}
PATH_SUFFIXES include
DOC "Find the LibEvent includes" )
find_library(LIBEVENT_LIBRARY NAMES event
HINTS ${LIBEVENT_SEARCH_PATH_LIST}
PATH_SUFFIXES lib
DOC "Find the LibEvent libraries" )
set(LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARY})
set(LIBEVENT_INCLUDE_DIRS ${LIBEVENT_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibEvent DEFAULT_MSG LIBEVENT_LIBRARY LIBEVENT_INCLUDE_DIR)
########################################
#
# Find the LongBow libraries and includes
# This module sets:
# LONGBOW_FOUND: True if LongBow was found
# LONGBOW_LIBRARY: The LongBow library
# LONGBOW_LIBRARIES: The LongBow library and dependencies
# LONGBOW_INCLUDE_DIR: The LongBow include dir
#
set(LONGBOW_SEARCH_PATH_LIST
${LONGBOW_HOME}
$ENV{LONGBOW_HOME}
$ENV{CCNX_HOME}
$ENV{PARC_HOME}
$ENV{FOUNDATION_HOME}
/usr/local/parc
/usr/local/ccnx
/usr/local/ccn
/usr/local
/opt
/usr
)
find_path(LONGBOW_INCLUDE_DIR LongBow/longBow_About.h
HINTS ${LONGBOW_SEARCH_PATH_LIST}
PATH_SUFFIXES include
DOC "Find the LongBow includes" )
find_library(LONGBOW_LIBRARY NAMES longbow
HINTS ${LONGBOW_SEARCH_PATH_LIST}
PATH_SUFFIXES lib
DOC "Find the LongBow libraries" )
find_library(LONGBOW_REPORT_LIBRARY NAMES longbow-textplain longbow-ansiterm
HINTS ${LONGBOW_SEARCH_PATH_LIST}
PATH_SUFFIXES lib
DOC "Find the LongBow report libraries" )
set(LONGBOW_LIBRARIES ${LONGBOW_LIBRARY} ${LONGBOW_REPORT_LIBRARY})
set(LONGBOW_INCLUDE_DIRS ${LONGBOW_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LongBow DEFAULT_MSG LONGBOW_LIBRARY LONGBOW_INCLUDE_DIR)
# Find uncrustify program
#
find_program( UNCRUSTIFY_BIN uncrustify
PATHS
$ENV{UNCRUSTIFY_HOME}
)
message( "-- UNCRUSTIFY found in ${UNCRUSTIFY_BIN}" )
# Detect the cache size
#
# XXX: TODO: This is a bug when cross compiling. We are detecting the local
# Cache Line size and not the target cache line size. We should provide some
# way to define this
set(LEVEL1_DCACHE_LINESIZE 32)
if( APPLE )
execute_process(COMMAND sysctl -n hw.cachelinesize
OUTPUT_VARIABLE LEVEL1_DCACHE_LINESIZE
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif( APPLE )
if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
execute_process(COMMAND getconf LEVEL1_DCACHE_LINESIZE
OUTPUT_VARIABLE LEVEL1_DCACHE_LINESIZE
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message("-- Cache line size: ${LEVEL1_DCACHE_LINESIZE}")
#
# Get a version to pass on the command line
#
execute_process(COMMAND ${PROJECT_SOURCE_DIR}/cmake/get_version.sh ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE RELEASE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date -u +%Y-%m-%dT%H:%M:%SZ
OUTPUT_VARIABLE ISO_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
MESSAGE( STATUS "Configuring version ${RELEASE_VERSION}" )
add_definitions("-DRELEASE_VERSION=\"${RELEASE_VERSION}\"")
#!/bin/sh
DATE_VERSION=`date "+%Y%m%d"`
if [ ! -d $1 ]; then
echo 0.$DATE_VERSION
exit
fi
if [ -f $1/BASE_VERSION ]; then
BASE_VERSION=`cat $1/BASE_VERSION`.
fi
GIT=`which git`
if test -x $GIT -a -f $1/.git/config; then
GIT_VERSION=.`git -C $1 rev-parse HEAD | cut -c 1-8`
fi
echo $BASE_VERSION$DATE_VERSION$GIT_VERSION
libparc.doctags
libparc-documentation
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.9.1 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Overview"/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="Public Types">
<tab type="classlist" visible="yes" title="Type List" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title="Type Index"/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="no" title="" intro=""/>
</tab>
<tab type="globals" visible="yes" title="Global Entities" intro=""/>
<tab type="files" visible="no" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<detaileddescription title=""/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>