diff --git a/bash/smake/etc/smake/help.smk b/bash/smake/etc/smake/help.smk new file mode 100644 index 0000000..307c772 --- /dev/null +++ b/bash/smake/etc/smake/help.smk @@ -0,0 +1,9 @@ +# This file is generated with smake.sh. +# You can use this make file with instruction make to +# use one of build mode: debug, profile, develop, release. +# No need to call make clean if You make with other mode, +# because the Makefile containes rules for automatically clean. +# Some usage examples: +# CFLAGS="-march=core2 -mtune=core2" make +# LDFLAGS="-lexpat" make mode=profile +# Report bugs to diff --git a/bash/smake/smake.sh b/bash/smake/smake.sh index 2a33cc5..fa15b7d 100755 --- a/bash/smake/smake.sh +++ b/bash/smake/smake.sh @@ -7,6 +7,7 @@ REP_LIBRARIES= REP_TARGET=target SMAKE_DIR=~/dev/bash/smake/etc/smake +HELP_FILE=$SMAKE_DIR/help.smk ENV_FILE=$SMAKE_DIR/env.smk BUILD_FILE=$SMAKE_DIR/build.smk RULES_FILE=$SMAKE_DIR/rules.smk @@ -43,9 +44,13 @@ while true ; do esac done +# ======= Help ======= +cat $HELP_FILE > Makefile +echo >> Makefile + # ======= Environment ======= sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \ - s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE > Makefile + s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE >> Makefile # INCLUDE0, INCLUDE1, INCLUDE2, ... REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g"`