summaryrefslogtreecommitdiff
path: root/graphics/xpaint/files/patch-util_Makefile
blob: 58dbb8d2074c1f037ce6f0dbe6561a0d273a5a4b (plain) (blame)
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
--- util/Makefile.orig	2012-02-05 15:14:24.000000000 +0100
+++ util/Makefile	2013-09-16 13:27:46.000000000 +0200
@@ -1,13 +1,11 @@
-GCC = gcc
-CPP = g++ -fpermissive
 
 all: pdfconcat ppmtops pgf2pnm
 
 pdfconcat:
-	$(GCC) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
+	$(CC) $(CFLAGS) -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
 
 ppmtops:
-	$(GCC) ppmtops.c -o ppmtops
+	$(CC) $(CFLAGS) ppmtops.c -o ppmtops
 
 pgf2pnm: main.cpp pnm.cpp
 	@if [ -x /usr/include/libpgf ] ; then \
@@ -15,25 +13,25 @@ pgf2pnm: main.cpp pnm.cpp
 	$(CPP) -c pnm.cpp -o pnm.o -I/usr/include/libpgf ; \
 	$(CPP) -o pgf2pnm main.o pnm.o -lpgf ; \
 	else \
-	@echo "libpgf not installed !!" ; \
+	echo "libpgf not installed !!" ; \
 	fi
 
 install:
 	@if [ -x pdfconcat ] ; then \
-	mkdir -p $(DESTDIR)/usr/bin ; \
-	install -c pdfconcat $(DESTDIR)/usr/bin ; \
-	echo "install -c pdfconcat $(DESTDIR)/usr/bin" ; \
-	mkdir -p $(DESTDIR)/usr/share/man/man1 ; \
-	install -c -m 644 pdfconcat.1 $(DESTDIR)/usr/share/man/man1 ; \
-	echo "install -c pdfconcat.1 $(DESTDIR)/usr/share/man/man1" ; fi
+	mkdir -p $(DESTDIR)$(PREFIX)/bin ; \
+	install -c pdfconcat $(DESTDIR)$(PREFIX)/bin ; \
+	echo "install -c pdfconcat $(DESTDIR)$(PREFIX)/bin" ; \
+	mkdir -p $(DESTDIR)$(PREFIX)/man/man1 ; \
+	install -c -m 644 pdfconcat.1 $(DESTDIR)$(PREFIX)/man/man1 ; \
+	echo "install -c pdfconcat.1 $(DESTDIR)$(PREFIX)/man/man1" ; fi
 	@if [ -x ppmtops ] ; then \
-	mkdir -p $(DESTDIR)/usr/bin ; \
-	install -c ppmtops $(DESTDIR)/usr/bin ; \
-	echo "install -c ppmtops $(DESTDIR)/usr/bin" ; fi
+	mkdir -p $(DESTDIR)$(PREFIX)/bin ; \
+	install -c -s ppmtops $(DESTDIR)$(PREFIX)/bin ; \
+	echo "install -c ppmtops $(DESTDIR)$(PREFIX)/bin" ; fi
 	@if [ -x pgf2pnm ] ; then \
-	mkdir -p $(DESTDIR)/usr/bin ; \
-	install -c pgf2pnm $(DESTDIR)/usr/bin ; \
-	echo "install -c pgf2pnm $(DESTDIR)/usr/bin" ; fi
+	mkdir -p $(DESTDIR)$(PREFIX)/bin ; \
+	install -c pgf2pnm $(DESTDIR)$(PREFIX)/bin ; \
+	echo "install -c pgf2pnm $(DESTDIR)$(PREFIX)/bin" ; fi
 
 clean:
 	rm -f core *~ *.o pdfconcat ppmtops pgf2pnm