forked from johangardhage/opengl-quake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ninja
34 lines (23 loc) · 969 Bytes
/
build.ninja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ninja_required_version = 1.5
cc = g++
_cflags_gnulinux = -Wall -s -march=native `sdl2-config --cflags` -D_UNIX
_libs_gnulinux = `sdl2-config --libs` `pkg-config --libs glu`
_cflags_mswindows = -I/mingw64/include -D_WIN64
_libs_mswindows = -L/mingw64/lib -mwindows -lopengl32 -lglu32 -lSDL2
########################################
### warning: activate or deactivate properly the following
### blocks of "cflags" and "libs" !
### gnulinux (tested: Debian 11, specifically MX Linux )
#cflags = $_cflags_gnulinux
#libs = $_libs_gnulinux
### mswindows (tested: Windows 11, using MSYS2/MINGW64 "pacman" packages )
#cflags = $_cflags_mswindows
#libs = $_libs_mswindows
########################################
builddir = build
srcdir = src
rule cc
command = $cc $cflags $in $libs -o $out
description = Building executable $out
build $builddir/quake: cc $srcdir/Quake.cpp $srcdir/World.cpp $srcdir/Map.cpp $srcdir/Camera.cpp
build quake: phony $builddir/quake