blob: 7b29a4943d8791dc7ab57b5efc076c2389ac8f66 (
plain)
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
|
From: Markus Koschany <apo@debian.org>
Date: Sat, 22 Mar 2014 16:04:03 +0100
Subject: Makefile
Forwarded: no
---
Makefile | 14 +++++++-------
data/Makefile | 2 +-
utils/Makefile | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index f1192bc..a7044ba 100644
--- a/Makefile
+++ b/Makefile
@@ -17,12 +17,12 @@ ifdef COMSPEC
endif
%.o : %.c
- $(CC) $(CFLAGS) `sdl-config --cflags` -c -o $@ $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) `sdl-config --cflags` -c -o $@ $<
$(NAME) : $(OBJS)
cd data; $(MAKE)
- $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
- -ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME)
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
+ -ljpeg -lvorbisfile -o $(NAME)
w32icon.o : data/icons/tuxpuck.ico
echo AppIcon ICON "data/icons/tuxpuck.ico" > temp.rc
@@ -52,7 +52,7 @@ dist :
rm -Rf $(NAME)-$(VERSION)
install : $(NAME)
- install -d $(DESTDIR)/usr/bin
- install -d $(DESTDIR)/usr/man/man6
- install -m755 $(NAME) $(DESTDIR)/usr/bin
- install -m644 man/$(NAME).6.gz $(DESTDIR)/usr/man/man6
+ install -d $(DESTDIR)/usr/games
+ install -d $(DESTDIR)/usr/share/man/man6
+ install -m755 $(NAME) $(DESTDIR)/usr/games
+ install -m644 man/$(NAME).6.gz $(DESTDIR)/usr/share/man/man6
diff --git a/data/Makefile b/data/Makefile
index b9215e4..5eff29e 100644
--- a/data/Makefile
+++ b/data/Makefile
@@ -10,7 +10,7 @@ SOURCES = pad_png.c puck_png.c tux_png.c glass_png.c scoreboard_png.c \
OBJS=$(SOURCES:.c=.o)
%.o : %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
libdata.a : $(OBJS)
ar r libdata.a $(OBJS)
diff --git a/utils/Makefile b/utils/Makefile
index 0566f28..9295d77 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -6,13 +6,13 @@ CFLAGS += -g -Wall -Werror
all : ttf2font data2c anim
ttf2font : ttf2font.c
- $(CC) $(CFLAGS) ttf2font.c `freetype-config --cflags --libs` -o ttf2font
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c `pkg-config --cflags --libs freetype2` -o ttf2font
data2c : data2c.c
- $(CC) $(CFLAGS) data2c.c `sdl-config --cflags --libs` -o data2c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c `sdl-config --cflags --libs` -o data2c
anim : anim.c
- $(CC) $(CFLAGS) anim.c `sdl-config --cflags --libs` -o anim
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c `sdl-config --cflags --libs` -o anim
clean :
rm -f *~ data2c ttf2font anim
|