#!/bin/sh # Cross-Platform: Works for GNU/Linux and Windows valac -o loader loader.vala --pkg=gmodule-2.0 valac --ccode plugin.vala if [[ `uname` == Linux ]]; then libext=so exeext= else libext=dll exeext=.exe fi gcc -fPIC -shared -o libplugin.$libext plugin.c $(pkg-config --libs --cflags gobject-2.0 gmodule-2.0) ./loader$exeext