Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
mafik committed Feb 3, 2023
1 parent 47303fd commit 867b214
Show file tree
Hide file tree
Showing 10 changed files with 836 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@
*.exe
*.out
*.app

# LibColony build artifacts
colony.js
colony.wasm
demo_sdl
compile_colony_js.json
compile_demo.json
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
all : colony.js demo_sdl

clean :
rm -f colony.js colony.wasm demo_sdl

colony.js : src/colony.h src/colony_js.cc src/colony_js_post.js
em++ -MJ compile_colony_js.json -s INITIAL_MEMORY=327680000 -s TOTAL_STACK=160000000 -O3 -lembind -o $@ -std=c++20 src/colony_js.cc --post-js src/colony_js_post.js
truncate -s -2 compile_colony_js.json

demo_sdl : src/*
clang++ -MJ compile_demo.json -o $@ -std=c++20 src/demo_sdl.cc `pkg-config --cflags --libs sdl2`
truncate -s -2 compile_demo.json

compile_commands.json : compile_colony_js.json compile_demo.json
jq -s '.' $^ > $@
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# LibColony

55 changes: 55 additions & 0 deletions compile_commands.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[
{
"directory": "/home/maf/Do opublikowania/libcolony/libcolony",
"file": "src/colony_js.cc",
"output": "/tmp/emscripten_temp_fpdoflat/colony_js_0.o",
"arguments": [
"/home/maf/emsdk/upstream/bin/clang-17",
"-xc++",
"src/colony_js.cc",
"-o",
"/tmp/emscripten_temp_fpdoflat/colony_js_0.o",
"--driver-mode=g++",
"--target=wasm32-unknown-emscripten",
"-fignore-exceptions",
"-fvisibility=default",
"-mllvm",
"-combiner-global-alias-analysis=false",
"-mllvm",
"-enable-emscripten-sjlj",
"-mllvm",
"-disable-lsr",
"-D",
"EMSCRIPTEN",
"--sysroot=/home/maf/emsdk/upstream/emscripten/cache/sysroot",
"-Xclang",
"-iwithsysroot/include/fakesdl",
"-Xclang",
"-iwithsysroot/include/compat",
"-O3",
"-std=c++20",
"-c",
"--target=wasm32-unknown-emscripten"
]
},
{
"directory": "/home/maf/Do opublikowania/libcolony/libcolony",
"file": "src/sdl.cc",
"output": "/tmp/sdl-d3f54b.o",
"arguments": [
"/usr/lib/llvm-14/bin/clang",
"-xc++",
"src/sdl.cc",
"--driver-mode=g++",
"-o",
"demo",
"-std=c++20",
"-D",
"_REENTRANT",
"-I",
"/usr/include/SDL2",
"-lSDL2",
"--target=x86_64-pc-linux-gnu"
]
}
]
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 867b214

Please sign in to comment.