aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-21 11:09:56 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-21 11:09:56 +0200
commit123144c93bfc77883c8fb517828b47bbe13b8671 (patch)
tree762739afedb5f3f168051367515cb9b9a06ec68d /Makefile
downloadminesweeper-master.tar.gz
minesweeper-master.zip
Initial commitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..635e04e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
1SRC = minesweeper.ha
2OBJ = minesweeper
3
4RAYLIB = -Lraylib -lraylib -lm
5
6UNAME = $(shell uname)
7ifeq ($(UNAME), OpenBSD)
8 GNUMAKE = gmake
9 IRAY = EXTRA_INCLUDE_PATHS='-I/usr/X11R6/include'
10 LRAY = CUSTOM_LDFLAGS='-L/usr/X11R6/lib'
11 GRAY = 'GRAPHICS = GRAPHICS_API_OPENGL_21' # My OpenBSD laptop is a potato
12else
13 GNUMAKE = make
14endif
15
16all: raylib/libraylib.a
17 hare build -o ${OBJ} ${RAYLIB} ${SRC}
18
19raylib/libraylib.a:
20 cd raylib/src && $(GNUMAKE) $(GRAY) $(IRAY) $(LRAY) $(RAYP)
21 cp raylib/src/libraylib.a raylib/
22 cd raylib/src && $(GNUMAKE) clean
23
24run: raylib/libraylib.a
25 hare run $(RAYLIB) $(SRC)
26
27test: raylib/libraylib.a
28 hare test $(RAYLIB) $(SRC)
29
30clean:
31 rm -f $(OBJ)
32 rm -f raylib/libraylib.a
33 cd raylib/src && $(GNUMAKE) clean
34
35.PHONY: all run clean

Generated with cgit - Back to sebastiano.tronto.net