diff --git a/std-script/compile b/std-script/compile --- a/std-script/compile +++ b/std-script/compile @@ -20,9 +20,9 @@ export CPLUSPLUS_COMPILER=/usr/bin/g++ export PASCAL_COMPILER=/usr/bin/gpc -export C_OPTIONS="-O2 -Wall" -export CPLUSPLUS_OPTIONS="-O2 -Wall" -export PASCAL_OPTIONS="-O2 -Wall" +export C_OPTIONS="-O2 -s -static -lm -Wall" +export CPLUSPLUS_OPTIONS="-O2 -s -static -lm -Wall" +export PASCAL_OPTIONS="-O2 -XS -lm -Wall" # Check for the correct number of arguments. Otherwise, print usage. if [ $# -eq 0 -o $# -gt 4 ] @@ -82,13 +82,13 @@ # Compile. if [ $PROG_LANG = "c" ] then - $C_COMPILER $C_OPTIONS -o $OUTPUT_FILE $SOURCE_FILE 2>$MESSAGE_FILE + $C_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $C_OPTIONS 2>$MESSAGE_FILE elif [ $PROG_LANG = "c++" ] then - $CPLUSPLUS_COMPILER $CPLUSPLUS_OPTIONS -o $OUTPUT_FILE $SOURCE_FILE 2>$MESSAGE_FILE + $CPLUSPLUS_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $CPLUSPLUS_OPTIONS 2>$MESSAGE_FILE elif [ $PROG_LANG = "pascal" ] then - $PASCAL_COMPILER $PASCAL_OPTIONS -o $OUTPUT_FILE $SOURCE_FILE 2>$MESSAGE_FILE + $PASCAL_COMPILER $SOURCE_FILE -o $OUTPUT_FILE $PASCAL_OPTIONS 2>$MESSAGE_FILE else talk "ERROR: Invalid language specified!" echo "ERROR: Invalid language specified!" > $MESSAGE_FILE @@ -103,4 +103,4 @@ talk "ERROR: Something was wrong during the compilation!" talk "Dumping compiler message:" #cat $MESSAGE_FILE -fi \ No newline at end of file +fi