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
|
diff -u -r larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/larn.sh larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/larn.sh
--- larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/larn.sh 2014-06-09 18:11:59.000000000 +0100
+++ larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/larn.sh 2017-05-04 11:28:35.200638538 +0100
@@ -1,5 +1,5 @@
#!/bin/bash
-LARNDIR="/usr/local/share/games/larn/lib/file/"
+LARNDIR="/usr/share/games/larn/lib/file/"
SAVEDIR="$HOME/.larn/save/"
SCOREDIR="$HOME/.larn/score/"
TMPDIR="/tmp/larn"
diff -u -r larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/src/makefile larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/src/makefile
--- larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/src/makefile 2014-06-09 18:11:59.000000000 +0100
+++ larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/src/makefile 2017-05-04 11:27:48.542897675 +0100
@@ -58,13 +58,14 @@
else
-CFLAGS=-Os -Wall -fomit-frame-pointer
-LDFLAGS=-Wl,-O1 -lncurses
+CFLAGS := -Os -Wall -fomit-frame-pointer $(CFLAGS)
+LDFLAGS := -Wl,-O1 -lncurses $(LDLAGS)
STRIP_BINARY=yes
endif
+PREFIX=/usr
OBJ=$(SRC:.c=.o)
EXE=larn
@@ -79,8 +80,7 @@
@echo Build complete!
ifeq ($(STRIP_BINARY),yes)
- @echo Stripping binary..
- @strip $(EXE)
+ strip $(EXE)
endif
.PHONY: debug
@@ -96,10 +96,11 @@
.PHONY : install
install:
- mkdir -p /usr/local/share/games/larn/lib/file
- cp -R ../lib/file/* /usr/local/share/games/larn/lib/file/
- cp larn /usr/local/share/games/larn/lib/file/
- cp ../larn.sh /usr/local/games/
+ mkdir -p $(DESTDIR)$(PREFIX)/share/games/larn/lib/file
+ cp -R ../lib/file/* $(DESTDIR)$(PREFIX)/share/games/larn/lib/file/
+ cp larn $(DESTDIR)$(PREFIX)/share/games/larn/lib/file/
+ mkdir -p $(DESTDIR)$(PREFIX)/games/
+ cp ../larn.sh $(DESTDIR)$(PREFIX)/games/
#.PHONY : distro
#distro:
@@ -112,8 +113,7 @@
# @$(CP) larn.* ..\\distro\\bin
%.o: %.c
- @echo Building $<
- @$(CC) $(CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) -o $@ -c $<
$(EXE): $(OBJ)
- @$(CC) $(OBJ) $(LDFLAGS) -o $@
+ $(CC) $(OBJ) $(LDFLAGS) -o $@
|