Set up repo

This commit is contained in:
Abdelrahman Said 2024-09-30 00:11:27 +01:00
commit 08dfd5fe3d
4 changed files with 27 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.cache
compile_commands.json
main

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Learn OpenGL
Following along with the [Learn OpenGL](https://learnopengl.com) tutorials

3
build Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
bear -- ./compile $@

18
compile Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
CC=clang
CFLAGS="-g -c -Wall -Isrc/glad/include"
CXX=clang++
CXXFLAGS="-g -Wall -std=c++20 $(pkg-config --cflags sdl2) -Isrc/glad/include -Isrc/glm"
LIBS="$(pkg-config --libs sdl2) -ldl"
GLAD_SRC="src/glad/src/glad.c"
GLAD_OBJ="glad.o"
SRC="src/*.cc $GLAD_OBJ src/glm/glm/glm.cppm"
OUT=main
(set -x ; $CC $CFLAGS $GLAD_SRC -o $GLAD_OBJ)
(set -x ; $CXX $CXXFLAGS $LIBS $SRC -o $OUT)
if [[ -f $GLAD_OBJ ]]; then
rm $GLAD_OBJ
fi