From 123144c93bfc77883c8fb517828b47bbe13b8671 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 21 Apr 2025 11:09:56 +0200 Subject: Initial commit --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..635e04e --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +SRC = minesweeper.ha +OBJ = minesweeper + +RAYLIB = -Lraylib -lraylib -lm + +UNAME = $(shell uname) +ifeq ($(UNAME), OpenBSD) + GNUMAKE = gmake + IRAY = EXTRA_INCLUDE_PATHS='-I/usr/X11R6/include' + LRAY = CUSTOM_LDFLAGS='-L/usr/X11R6/lib' + GRAY = 'GRAPHICS = GRAPHICS_API_OPENGL_21' # My OpenBSD laptop is a potato +else + GNUMAKE = make +endif + +all: raylib/libraylib.a + hare build -o ${OBJ} ${RAYLIB} ${SRC} + +raylib/libraylib.a: + cd raylib/src && $(GNUMAKE) $(GRAY) $(IRAY) $(LRAY) $(RAYP) + cp raylib/src/libraylib.a raylib/ + cd raylib/src && $(GNUMAKE) clean + +run: raylib/libraylib.a + hare run $(RAYLIB) $(SRC) + +test: raylib/libraylib.a + hare test $(RAYLIB) $(SRC) + +clean: + rm -f $(OBJ) + rm -f raylib/libraylib.a + cd raylib/src && $(GNUMAKE) clean + +.PHONY: all run clean -- cgit v1.3