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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
From faf9c604becc44135d6c5a7c8427982e203a327f Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Fri, 8 May 2020 11:26:18 +0100
Subject: [PATCH 1/2] Allow software rendering to be easily chosen over OpenGL
with OPENGL=0
---
Makefile | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index ebbd53a4..adabaa92 100644
--- a/Makefile
+++ b/Makefile
@@ -26,19 +26,26 @@ CPPFLAGS ?=
LDFLAGS ?= $(OPTIMISE)
LIBS ?=
+# set this to 0 to use software rendering instead of OpenGL
+OPENGL = 1
+
# general things needed by Eureka
CXXFLAGS += $(CXX_DIALECT)
-LIBS += -lGLU -lGL
LIBS += -lz -lm
+FLTK_CONFIG_FLAGS =
-# add this for software rendering, remove '--use-gl' below, remove -lGL and -lGLU from LIBS
-# CXXFLAGS += -DNO_OPENGL
+ifeq ($(OPENGL),1)
+LIBS += -lGLU -lGL
+FLTK_CONFIG_FLAGS += --use-gl
+else
+CXXFLAGS += -DNO_OPENGL
+endif
# FLTK flags (this assumes a system-wide FLTK installation)
FLTK_CONFIG ?= fltk-config
-CXXFLAGS += $(shell $(FLTK_CONFIG) --use-images --use-gl --cxxflags)
-LDFLAGS += $(shell $(FLTK_CONFIG) --use-images --use-gl --ldflags)
+CXXFLAGS += $(shell $(FLTK_CONFIG) --use-images --cxxflags $(FLTK_CONFIG_FLAGS))
+LDFLAGS += $(shell $(FLTK_CONFIG) --use-images --ldflags $(FLTK_CONFIG_FLAGS))
# NOTE: the following is commented out since it does not work as expected.
# the --libs option gives us static libraries, but --ldflags option
--
2.26.2
From decee12e317e58128420771392b77c44a7c81122 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Fri, 8 May 2020 11:27:49 +0100
Subject: [PATCH 2/2] Ensure bin directory is present before installing binary
It might not be when using DESTDIR.
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index adabaa92..424ad4b5 100644
--- a/Makefile
+++ b/Makefile
@@ -158,6 +158,7 @@ stripped: all
INSTALL_DIR=$(DESTDIR)$(PREFIX)/share/eureka
install: all
+ install -d $(DESTDIR)$(PREFIX)/bin
install -m 755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/
install -d $(INSTALL_DIR)/games
install -d $(INSTALL_DIR)/common
--
2.26.2
|