~octaspire/dern

077cf617adbf4d85cd1ec2c9145e0a1507071c06 — octaspire 5 years ago 1138db6 v0.479.1
Fix (partially) Windows MinGW build
M dev/include/octaspire/dern/octaspire_dern_config.h => dev/include/octaspire/dern/octaspire_dern_config.h +1 -1
@@ 19,7 19,7 @@ limitations under the License.

#define OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "0"
#define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "479"
#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "0"
#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "1"

#define OCTASPIRE_DERN_CONFIG_VERSION_STR "Octaspire Dern version " \
    OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "." \

M release/how-to-build/windows-mingw.sh => release/how-to-build/windows-mingw.sh +11 -11
@@ 37,59 37,59 @@ if [ "$2" = "--coverage" ]; then COVERAGE=$2; fi
EXAMPLE_NAME="stand alone unit test runner"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-unit-test-runner.exe"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -DOCTASPIRE_DERN_AMALGAMATED_UNIT_TEST_IMPLEMENTATION -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS $COVERAGE -I . octaspire-dern-amalgamated.c -lm -lKernel32 -o octaspire-dern-unit-test-runner
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -DOCTASPIRE_DERN_AMALGAMATED_UNIT_TEST_IMPLEMENTATION -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS $COVERAGE -I . octaspire-dern-amalgamated.c -lm -lKernel32 -o octaspire-dern-unit-test-runner



EXAMPLE_NAME="embedding example"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="embedding-example.exe"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS -I . examples/embedding-example.c -lm -lKernel32 -o embedding-example
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS -I . examples/embedding-example.c -lm -lKernel32 -o embedding-example


EXAMPLE_NAME="implementation library for binary library example"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN=""
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -DOCTASPIRE_DERN_AMALGAMATED_IMPLEMENTATION -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS octaspire-dern-amalgamated.c -lKernel32 -shared -Wl,--out-implib=imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -DOCTASPIRE_DERN_AMALGAMATED_IMPLEMENTATION -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS octaspire-dern-amalgamated.c -lKernel32 -shared -Wl,--out-implib=imp.a
EXAMPLE_NAME="binary library example"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl.exe examples\\use-mylib.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -shared -I . -o libmylib.dll examples/mylib.c -L . imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -shared -I . -o libmylib.dll examples/mylib.c -L . imp.a



EXAMPLE_NAME="interactive Dern REPL"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl.exe"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -DOCTASPIRE_DERN_AMALGAMATED_REPL_IMPLEMENTATION -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS -I . octaspire-dern-amalgamated.c -lm -lKernel32 -o octaspire-dern-repl
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -DOCTASPIRE_DERN_AMALGAMATED_REPL_IMPLEMENTATION -DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS -I . octaspire-dern-amalgamated.c -lm -lKernel32 -o octaspire-dern-repl



EXAMPLE_NAME="Dern socket plugin"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl examples\\irc-client.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -shared -I . -o libdern_socket.dll plugins/dern_socket.c -lws2_32 -L . imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -shared -I . -o libdern_socket.dll plugins/dern_socket.c -lws2_32 -L . imp.a



EXAMPLE_NAME="Dern dir plugin"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl examples\\dern-dir-example.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -shared -I . -shared -o libdern_dir.dll plugins/dern_dir.c -lKernel32 -L . imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -shared -I . -shared -o libdern_dir.dll plugins/dern_dir.c -lKernel32 -L . imp.a



EXAMPLE_NAME="Dern easing plugin"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl examples\\dern-easing-example.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -shared -I . -shared -o libdern_easing.dll plugins/dern_easing.c -L . imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -shared -I . -shared -o libdern_easing.dll plugins/dern_easing.c -L . imp.a



EXAMPLE_NAME="Dern animation plugin"
EXAMPLE_ERROR_HINT="Install $CC compiler?"
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl examples\\dern-animation-example.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -shared -I . -shared -o libdern_animation.dll plugins/dern_animation.c -L . imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -shared -I . -shared -o libdern_animation.dll plugins/dern_animation.c -L . imp.a





@@ 101,7 101,7 @@ read -rd '' EXAMPLE_ERROR_HINT << EOF
    d) Run command: how-to-build/windows.sh
EOF
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl examples\\dern-ncurses-example.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -I . -shared -o libdern_ncurses.dll plugins/dern_ncurses.c -L . -lpdcurses imp.a
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -I . -shared -o libdern_ncurses.dll plugins/dern_ncurses.c -L . -lpdcurses imp.a





@@ 121,5 121,5 @@ read -rd '' EXAMPLE_ERROR_HINT << EOF
    cp SDL2_ttf-2.0.14/i686-w64-mingw32/bin/*.dll .
EOF
EXAMPLE_SUCCESS_RUN="octaspire-dern-repl examples\\dern-sdl2-example.dern"
echoAndRun "$CC" -O2 -std=c99 -Wall -Wextra -fPIC -shared -DOCTASPIRE_DERN_SDL2_PLUGIN_USE_SDL_IMAGE_LIBRARY -DOCTASPIRE_DERN_SDL2_PLUGIN_USE_SDL_MIXER_LIBRARY -DOCTASPIRE_DERN_SDL2_PLUGIN_USE_SDL_TTF_LIBRARY -Dmain=SDL_main -I . -I SDL2-2.0.7/i686-w64-mingw32/include/SDL2 -I SDL2_image-2.0.2/i686-w64-mingw32/include/SDL2 -I SDL2_mixer-2.0.2/i686-w64-mingw32/include/SDL2 -I SDL2_ttf-2.0.14/i686-w64-mingw32/include/SDL2 -o libdern_sdl2.dll plugins/dern_sdl2.c -L . -L SDL2-2.0.7/i686-w64-mingw32/lib -L SDL2_image-2.0.2/i686-w64-mingw32/lib -L SDL2_mixer-2.0.2/i686-w64-mingw32/lib -L SDL2_ttf-2.0.14/i686-w64-mingw32/lib imp.a -lSDL2main -lSDL2 libSDL2_image.a -lSDL2_mixer -lSDL2_ttf
echoAndRun "$CC" -O2 -std=gnu99 -Wall -Wextra -fPIC -shared -DOCTASPIRE_DERN_SDL2_PLUGIN_USE_SDL_IMAGE_LIBRARY -DOCTASPIRE_DERN_SDL2_PLUGIN_USE_SDL_MIXER_LIBRARY -DOCTASPIRE_DERN_SDL2_PLUGIN_USE_SDL_TTF_LIBRARY -Dmain=SDL_main -I . -I SDL2-2.0.7/i686-w64-mingw32/include/SDL2 -I SDL2_image-2.0.2/i686-w64-mingw32/include/SDL2 -I SDL2_mixer-2.0.2/i686-w64-mingw32/include/SDL2 -I SDL2_ttf-2.0.14/i686-w64-mingw32/include/SDL2 -o libdern_sdl2.dll plugins/dern_sdl2.c -L . -L SDL2-2.0.7/i686-w64-mingw32/lib -L SDL2_image-2.0.2/i686-w64-mingw32/lib -L SDL2_mixer-2.0.2/i686-w64-mingw32/lib -L SDL2_ttf-2.0.14/i686-w64-mingw32/lib imp.a -lSDL2main -lSDL2 libSDL2_image.a -lSDL2_mixer -lSDL2_ttf


M release/octaspire-dern-amalgamated.c => release/octaspire-dern-amalgamated.c +1 -1
@@ 26337,7 26337,7 @@ limitations under the License.

#define OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "0"
#define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "479"
#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "0"
#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "1"

#define OCTASPIRE_DERN_CONFIG_VERSION_STR "Octaspire Dern version " \
    OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "." \