522 break |
522 break |
523 done |
523 done |
524 break |
524 break |
525 done |
525 done |
526 |
526 |
|
527 # build type |
|
528 if [ "$BUILD_TYPE" = "debug" ]; then |
|
529 TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" |
|
530 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" |
|
531 fi |
|
532 if [ "$BUILD_TYPE" = "release" ]; then |
|
533 TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" |
|
534 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" |
|
535 fi |
|
536 |
527 # add general dependency flags to flags.mk |
537 # add general dependency flags to flags.mk |
528 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
538 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
529 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
539 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
530 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
540 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
531 fi |
541 fi |
596 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
606 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
597 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
607 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
598 fi |
608 fi |
599 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
609 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
600 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
610 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
601 fi |
|
602 if [ "$BUILD_TYPE" = "debug" ]; then |
|
603 if [ -n "$lang_c" ]; then |
|
604 echo 'CFLAGS += ${DEBUG_CFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
605 fi |
|
606 if [ -n "$lang_cpp" ]; then |
|
607 echo 'CXXFLAGS += ${DEBUG_CXXFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
608 fi |
|
609 fi |
|
610 if [ "$BUILD_TYPE" = "release" ]; then |
|
611 if [ -n "$lang_c" ]; then |
|
612 echo 'CFLAGS += ${RELEASE_CFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
613 fi |
|
614 if [ -n "$lang_cpp" ]; then |
|
615 echo 'CXXFLAGS += ${RELEASE_CXXFLAGS}' >> "$TEMP_DIR/flags.mk" |
|
616 fi |
|
617 fi |
611 fi |
618 if [ -n "${TEMP_LDFLAGS}" ]; then |
612 if [ -n "${TEMP_LDFLAGS}" ]; then |
619 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
613 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
620 fi |
614 fi |
621 |
615 |