-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.patch
91 lines (73 loc) · 2.33 KB
/
make.patch
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
From 14edf468bc0f26b8523ca5e64a22d119add74cae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
<Mailaender@users.noreply.github.com>
Date: Fri, 13 May 2022 22:56:26 +0200
Subject: [PATCH 1/3] Allow the PREFIX to be actually set
---
Makefile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 555def7..7ea0326 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,4 @@
-ifndef PREFIX
- PREFIX=/usr/local/
-endif
+PREFIX?=/usr/local
DESTDIR?=$(PREFIX)share/games/sdl-ball/
From cee3c88a8bb0847f3649f5a82d00a595fd2a2114 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= <matthias@mailaender.name>
Date: Sat, 14 May 2022 12:00:14 +0200
Subject: [PATCH 2/3] Adhere to File System Hierarchy
---
Makefile | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 7ea0326..6159f8d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,7 @@
PREFIX?=/usr/local
-DESTDIR?=$(PREFIX)share/games/sdl-ball/
-
-DATADIR?=themes/
-BINDIR=bin/
+DATADIR?=$(PREFIX)/share/games/sdl-ball/themes/
+BINDIR?=$(PREFIX)/bin/
#append -DWITH_WIIUSE to compile with WIIUSE support!
#append -DNOSOUND to compile WITHOUT sound support
@@ -36,9 +34,8 @@ clean:
install: $(EXECUTABLE) install-bin install-data
install-bin:
- mkdir -p $(DESTDIR)
- cp $(EXECUTABLE) $(DESTDIR)
- ln -s $(DESTDIR)$(EXECUTABLE) $(PREFIX)$(BINDIR)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp $(EXECUTABLE) $(DESTDIR)$(BINDIR)
install-data:
mkdir -p $(DESTDIR)$(DATADIR)
From 93391dd49bf7c9c4f360cb6e5d4ae7ef6c5e21af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= <matthias@mailaender.name>
Date: Sat, 14 May 2022 12:00:38 +0200
Subject: [PATCH 3/3] Don't strip as this is usually done afterwards
for debug packages.
---
Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/Makefile b/Makefile
index 6159f8d..9c3dff0 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,6 @@ BINDIR?=$(PREFIX)/bin/
#append -DWITH_WIIUSE to compile with WIIUSE support!
#append -DNOSOUND to compile WITHOUT sound support
-STRIP=strip
CXX?=g++
CXXFLAGS+=-Wall `sdl-config --cflags` -DDATADIR="\"$(DATADIR)\""
@@ -23,7 +22,6 @@ all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
- $(STRIP) $@
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< -o $@