366 break |
366 break |
367 done |
367 done |
368 |
368 |
369 # add general dependency flags to flags.mk |
369 # add general dependency flags to flags.mk |
370 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
370 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
371 if [ -n "${TEMP_CFLAGS}" ]; then |
371 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then |
372 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
372 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
373 fi |
373 fi |
374 if [ -n "${TEMP_CXXFLAGS}" ]; then |
374 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then |
375 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
375 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
376 fi |
376 fi |
377 if [ -n "${TEMP_LDFLAGS}" ]; then |
377 if [ -n "${TEMP_LDFLAGS}" ]; then |
378 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
378 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
379 fi |
379 fi |
428 unset FEATURE_PG |
428 unset FEATURE_PG |
429 fi |
429 fi |
430 fi |
430 fi |
431 |
431 |
432 |
432 |
433 if [ -n "${TEMP_CFLAGS}" ]; then |
433 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then |
434 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
434 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
435 fi |
435 fi |
436 if [ -n "${TEMP_CXXFLAGS}" ]; then |
436 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then |
437 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
437 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
438 fi |
438 fi |
439 if [ "$BUILD_TYPE" = "debug" ]; then |
439 if [ "$BUILD_TYPE" = "debug" ]; then |
440 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
440 if [ -n "$lang_c" ]; then |
441 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
441 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
442 fi |
|
443 if [ -n "$lang_cpp" ]; then |
|
444 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
445 fi |
442 fi |
446 fi |
443 if [ "$BUILD_TYPE" = "release" ]; then |
447 if [ "$BUILD_TYPE" = "release" ]; then |
444 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
448 if [ -n "$lang_c" ]; then |
445 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
449 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
450 fi |
|
451 if [ -n "$lang_cpp" ]; then |
|
452 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
|
453 fi |
446 fi |
454 fi |
447 if [ -n "${TEMP_LDFLAGS}" ]; then |
455 if [ -n "${TEMP_LDFLAGS}" ]; then |
448 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
456 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
449 fi |
457 fi |
450 |
458 |