diff --git a/doxygen_template.conf b/doxygen_template.conf index ba510ce08e1b9d384c42521222a0224b97699521..f979a270136ac9b90ce49095d890a08f86b4b03c 100755 --- a/doxygen_template.conf +++ b/doxygen_template.conf @@ -83,6 +83,7 @@ WARN_LOGFILE = # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = ../src \ + ../include \ ../ReadMe.md INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.c \ diff --git a/new_project.sh b/new_project.sh index edda33170cc876400bc18bd9836a33df57afe144..c190604bda99331610e77d62a86344fcb70594a0 100755 --- a/new_project.sh +++ b/new_project.sh @@ -81,6 +81,15 @@ else echo "Creating $SRC_DIR directory" mkdir $SRC_DIR fi +# create the include directory +INCLUDE_DIR="./include" +if [ -e "$INCLUDE_DIR" ] +then + echo "$INCLUDE_DIR directory already exists, skipping ..." +else + echo "Creating $INCLUDE_DIR directory" + mkdir $INCLUDE_DIR +fi #create the src/examples directory if [ $TYPE = library ] then @@ -163,7 +172,7 @@ then echo "FIND_PACKAGE($x REQUIRED)" >> CMakeLists.tmp done echo "# add the necessary include directories" >> CMakeLists.tmp - echo "INCLUDE_DIRECTORIES(.)" >> CMakeLists.tmp + echo "INCLUDE_DIRECTORIES(../include)" >> CMakeLists.tmp for x in $arr do echo "INCLUDE_DIRECTORIES("'${'"${x}_INCLUDE_DIR"'}'")" >> CMakeLists.tmp @@ -171,7 +180,7 @@ then echo "# application source files" >> CMakeLists.tmp echo "SET(sources ${NAME}.cpp)" >> CMakeLists.tmp echo "# application header files" >> CMakeLists.tmp - echo "SET(headers ${NAME}.h)" >> CMakeLists.tmp + echo "SET(headers ../include/${NAME}.h)" >> CMakeLists.tmp echo "# create the executable file" >> CMakeLists.tmp echo "ADD_EXECUTABLE(${NAME} "'${'"sources"'}'")" >> CMakeLists.tmp echo "# link necessary libraries" >> CMakeLists.tmp @@ -185,14 +194,14 @@ else echo "# driver source files" >> CMakeLists.tmp echo "SET(sources ${NAME}.cpp)" >> CMakeLists.tmp echo "# application header files" >> CMakeLists.tmp - echo "SET(headers ${NAME}.h)" >> CMakeLists.tmp + echo "SET(headers ../include/${NAME}.h)" >> CMakeLists.tmp echo "# locate the necessary dependencies" >> CMakeLists.tmp for x in $arr do echo "FIND_PACKAGE($x REQUIRED)" >> CMakeLists.tmp done echo "# add the necessary include directories" >> CMakeLists.tmp - echo "INCLUDE_DIRECTORIES(.)" >> CMakeLists.tmp + echo "INCLUDE_DIRECTORIES(../include)" >> CMakeLists.tmp for x in $arr do echo "INCLUDE_DIRECTORIES("'${'"${x}_INCLUDE_DIR"'}'")" >> CMakeLists.tmp @@ -230,7 +239,7 @@ else LIBRARY_NAME=$(echo $NAME | tr '[:lower:]' '[:upper:]') Library_name=$(echo $NAME | sed 's/\([a-zA-Z]\)\([a-zA-Z0-9]*\)/\u\1\2/g') sed 's/Library_name/'$Library_name'/g' <driver_header_template.h >tmp.h - sed 's/LIBRARY_NAME/'$LIBRARY_NAME'/g' <tmp.h >./src/$NAME.h + sed 's/LIBRARY_NAME/'$LIBRARY_NAME'/g' <tmp.h >./include/$NAME.h rm tmp.h sed 's/library_name/'$NAME'/g' <driver_src_template.cpp >tmp.cpp