483 done |
483 done |
484 break |
484 break |
485 done |
485 done |
486 #end |
486 #end |
487 |
487 |
|
488 # build type |
|
489 if [ "$BUILD_TYPE" = "debug" ]; then |
|
490 TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" |
|
491 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" |
|
492 fi |
|
493 if [ "$BUILD_TYPE" = "release" ]; then |
|
494 TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" |
|
495 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" |
|
496 fi |
|
497 |
488 # add general dependency flags to flags.mk |
498 # add general dependency flags to flags.mk |
489 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
499 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
490 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
500 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
491 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
501 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
492 fi |
502 fi |
659 echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
669 echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
660 fi |
670 fi |
661 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
671 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
662 echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
672 echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
663 fi |
673 fi |
664 if [ "$BUILD_TYPE" = "debug" ]; then |
|
665 if [ -n "$lang_c" ]; then |
|
666 echo '${target.cFlags} += ${DEBUG_CFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
667 fi |
|
668 if [ -n "$lang_cpp" ]; then |
|
669 echo '${target.cxxFlags} += ${DEBUG_CXXFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
670 fi |
|
671 fi |
|
672 if [ "$BUILD_TYPE" = "release" ]; then |
|
673 if [ -n "$lang_c" ]; then |
|
674 echo '${target.cFlags} += ${RELEASE_CFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
675 fi |
|
676 if [ -n "$lang_cpp" ]; then |
|
677 echo '${target.cxxFlags} += ${RELEASE_CXXFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
678 fi |
|
679 fi |
|
680 if [ -n "${TEMP_LDFLAGS}" ]; then |
674 if [ -n "${TEMP_LDFLAGS}" ]; then |
681 echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
675 echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
682 fi |
676 fi |
683 |
677 |
684 #end |
678 #end |