Basic setup for building something with app.h on Windows/Linux/Mac/Web
No build system is used, simply call the compiler from the commandline.
From a Visual Studio Developer Command Prompt, do:
cl source\main.c
Alternatively, you can use Tiny C Compiler:
tcc\tcc source\main.c
You can download tcc here: tiny-c-compiler for either 32 or 64 bit Windows. Unzip it so that the tcc
folder in the zip file is at your repository root.
clang source/main.c `sdl2-config --libs --cflags` -lGLEW -framework OpenGL -lpthread
SDL2 and GLEW are required - if you don't have them installed you can do so with Homebrew by running
brew install sdl2 glew
gcc source/main.c `sdl2-config --libs --cflags` -lGLEW -lGL -lm -lpthread
SDL2 and GLEW are required - if you don't have them installed you can do so on Ubuntu (or wherever apt-get
is available) by running
sudo apt-get install libsdl2-dev
sudo apt-get install libglew-dev
Using WAjic:
wasm\node wasm\wajicup.js source/main.c main.html
You can embed asset files in the process with the -embed parameter.
A WebAssembly build environment is required. You can download it (for Windows) here: wasm-build-tools-win.
Unzip it so that the wasm
folder in the zip file is at your repository root.
The wasm build environment is a compact distribution of node, clang/wasm-ld, WAjic and wasm system libraries.