diff --git a/.Description b/.Description new file mode 100644 index 0000000..cdae9af --- /dev/null +++ b/.Description @@ -0,0 +1,9 @@ +A model of the electromotor command network and a genetic algorithm +to fit neural network models to temporal output patterns. +It is written in an object oriented fashion with heavily templated C++. + +To build it, just type: +> mkdir bin +> cd bin +> cmake .. +> make \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 19efec1..46eefd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8) -project(efish-nmodel CXX) +project(electromotor-nmodel CXX) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake.modules/") @@ -32,22 +32,28 @@ add_custom_target(GA COMMAND make lib ) add_subdirectory(thirdparty/Neun) add_subdirectory(thirdparty/libStats) +add_subdirectory(include) add_subdirectory(src) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Modeling the variability of the electromotor command system of pulse mormyrids.") SET(CPACK_PACKAGE_VENDOR "Lareo, A., Varona P. and Rodriguez, FB.") set(CPACK_PACKAGE_CONTACT "angel.lareo@gmail.com") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "Readme.md") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/.Description") SET(CPACK_PACKAGE_VERSION_MAJOR ${CMake_VERSION_MAJOR}) SET(CPACK_PACKAGE_VERSION_MINOR ${CMake_VERSION_MINOR}) SET(CPACK_PACKAGE_VERSION_PATCH ${CMake_VERSION_PATCH}) SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") -#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-program-options1.40.0") -#set(CPACK_DEBIAN_PACKAGE_SECTION "science") -#set(CPACK_GENERATOR "DEB") +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "A. Lareo") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.45)") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libyaml-cpp-dev (>= 0.6.2)") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libhdf5-dev (>= 1.10.4)") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libhdf5-cpp-103 (>= 1.10.4)") +SET(CPACK_DEBIAN_PACKAGE_SECTION "science") +SET(CPACK_GENERATOR "DEB") -#include(CPack) -#configure_file(neun.pc.in neun.pc @ONLY) -#install(FILES neun.pc DESTINATION pkgconfig) +include(CPack) + +configure_file(electromotor-nmodel.pc.in ${CMAKE_SOURCE_DIR}/electromotor-nmodel.pc @ONLY) +install(FILES electromotor-nmodel.pc DESTINATION pkgconfig) \ No newline at end of file diff --git a/electromotor-nmodel.pc b/electromotor-nmodel.pc new file mode 100644 index 0000000..5d56ff7 --- /dev/null +++ b/electromotor-nmodel.pc @@ -0,0 +1,10 @@ +prefix=/usr/local/electromotor-nmodel/0.1.0 +exec_prefix=${prefix} +includedir=${prefix} + +Name: neun +Description: Modeling the variability of the electromotor command system of pulse mormyrids. +Requires: +Version: 0.1.0 +Libs: +Cflags: -I${includedir} diff --git a/electromotor-nmodel.pc.in b/electromotor-nmodel.pc.in new file mode 100644 index 0000000..7641d49 --- /dev/null +++ b/electromotor-nmodel.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@/@PROJECT_NAME@/@PROJECT_VERSION@ +exec_prefix=${prefix} +includedir=${prefix} + +Name: neun +Description: @CPACK_PACKAGE_DESCRIPTION_SUMMARY@ +Requires: +Version: @PROJECT_VERSION@ +Libs: +Cflags: -I${includedir} diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..f898e5f --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,2 @@ +# install(FILES *.h +# DESTINATION ${PROJECT_NAME}/${PROJECT_VERSION}/include) \ No newline at end of file diff --git a/scripts/run-GA.sh b/scripts/run-GA.sh index 8cab22b..155f5ae 100644 --- a/scripts/run-GA.sh +++ b/scripts/run-GA.sh @@ -9,7 +9,7 @@ outputDir="$vDir/ga-results/${startConfigName}_${run}" mkdir ${outputDir} GAParameters="G800_N150_P90" -${vDir}/bin/emmodelGAfit -i ${configFile} -g 800 -n 150 -p 90 \ +${vDir}/bin/emmodelGAFit -i ${configFile} -g 800 -n 150 -p 90 \ -s "${outputDir}/${startConfigName}_${run}_${GAParameters}.stats" \ -o "${outputDir}/${startConfigName}_${run}_${GAParameters}.dat" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0399955..b87ca6c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,8 +7,22 @@ set ( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) add_executable(emmodel emmodel.cpp) target_link_libraries(emmodel ${YAMLCPP_LIBRARY}) +install(TARGETS emmodel + RUNTIME DESTINATION "/usr/bin" + LIBRARY DESTINATION "/usr/lib" + PUBLIC_HEADER DESTINATION "/usr/include" + DESTINATION "/usr/share" +) + link_libraries("-static") -add_executable(emmodelGAfit emmodelGAFit.cpp) -add_dependencies(emmodelGAfit GA) -set_target_properties(emmodelGAfit PROPERTIES LINK_FLAGS "-static" ) -target_link_libraries(emmodelGAfit ${YAMLCPP_LIBRARY} ${CMAKE_SOURCE_DIR}/thirdparty/GA/ga/libga.a) +add_executable(emmodelGAFit emmodelGAFit.cpp) +add_dependencies(emmodelGAFit GA) +set_target_properties(emmodelGAFit PROPERTIES LINK_FLAGS "-static" ) +target_link_libraries(emmodelGAFit ${YAMLCPP_LIBRARY} ${CMAKE_SOURCE_DIR}/thirdparty/GA/ga/libga.a) + +install(TARGETS emmodelGAFit + RUNTIME DESTINATION "/usr/bin" + LIBRARY DESTINATION "/usr/lib" + PUBLIC_HEADER DESTINATION "/usr/include" + DESTINATION "/usr/share" +) \ No newline at end of file