test/configure

changeset 134
95ae5973c142
parent 133
59b14b75f12b
equal deleted inserted replaced
133:59b14b75f12b 134:95ae5973c142
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
645 pwd=`pwd` 639 pwd=`pwd`
646 cat > "$TEMP_DIR/config.mk" << __EOF__ 640 cat > "$TEMP_DIR/config.mk" << __EOF__
647 # 641 #
648 # config.mk generated by: 642 # config.mk generated by:
649 # pwd: $pwd 643 # pwd: $pwd
650 # cmd: $0 $@ 644 # $0 $@
651 # 645 #
652 646
653 __EOF__ 647 __EOF__
654 write_toolchain_defaults "$TEMP_DIR/toolchain.mk" 648 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
655 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk 649 cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk

mercurial