src/main/resources/make/configure.vm

changeset 134
95ae5973c142
parent 133
59b14b75f12b
child 135
9afe68b15c66
--- a/src/main/resources/make/configure.vm	Sun Jan 12 12:45:11 2025 +0100
+++ b/src/main/resources/make/configure.vm	Sun Jan 12 13:23:35 2025 +0100
@@ -485,6 +485,16 @@
 done
 #end
 
+# build type
+if [ "$BUILD_TYPE" = "debug" ]; then
+    TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS"
+	TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+if [ "$BUILD_TYPE" = "release" ]; then
+	TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS"
+	TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS"
+fi
+
 # add general dependency flags to flags.mk
 echo "# general flags" >> "$TEMP_DIR/flags.mk"
 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
@@ -661,22 +671,6 @@
 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
     echo "${target.cxxFlags}  += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
 fi
-if [ "$BUILD_TYPE" = "debug" ]; then
-    if [ -n "$lang_c" ]; then
-        echo '${target.cFlags} += ${DEBUG_CFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo '${target.cxxFlags} += ${DEBUG_CXXFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
-if [ "$BUILD_TYPE" = "release" ]; then
-    if [ -n "$lang_c" ]; then
-        echo '${target.cFlags} += ${RELEASE_CFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-    if [ -n "$lang_cpp" ]; then
-        echo '${target.cxxFlags} += ${RELEASE_CXXFLAGS}' >> "$TEMP_DIR/flags.mk"
-    fi
-fi
 if [ -n "${TEMP_LDFLAGS}" ]; then
     echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
 fi

mercurial