summaryrefslogtreecommitdiffstats
path: root/graphics/jpeg2ps/files/patch-Makefile
blob: 563c0ec4be9246683ccc858a3217d5590d3f3498 (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
--- Makefile.orig	2002-02-04 20:39:21.000000000 +0900
+++ Makefile	2013-04-27 23:58:44.000000000 +0900
@@ -14,15 +14,17 @@
 # The following was reported to work for emx/gcc 0.9c fix04 under OS/2:
 # make -f Makefile "CFLAGS=-c -DA4 -DDOS -O2" "LDFLAGS=-Zexe -s"
 
-CFLAGS=-c -DA4
-LD=cc
-LDFLAGS=
+PREFIX?=	/usr/local
+LOCALBASE?=	/usr/local
+LD=	${CC}
+LDFLAGS?=
+LDADD?=
 OBJ=o
 EXE=
 RM=rm -f
 
 .c.$(OBJ) :
-	$(CC) $(CFLAGS) $*.c
+	$(CC) $(CFLAGS) -c $*.c
 
 all:	jpeg2ps$(EXE)
 
@@ -30,7 +32,7 @@
 # at the end of the next two lines below.
 
 jpeg2ps$(EXE):	jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ)
-	$(LD) $(LDFLAGS) -o jpeg2ps$(EXE) jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ)
+	$(LD) $(LDFLAGS) -o jpeg2ps$(EXE) jpeg2ps.$(OBJ) readjpeg.$(OBJ) asc85ec.$(OBJ) $(LDADD)
 
 DISTFILES = \
 	jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c	\
@@ -42,10 +44,10 @@
 
 # Location where to install the binary. This is a suitable value for Linux
 # (and possibly other unix-like) systems.
-BINDIR = /usr/local/bin
+BINDIR?= ${PREFIX}/bin
 
 # Location where to install the manual page.
-MANDIR = /usr/local/man/man1
+MANDIR?= ${MAN1PREFIX}/man/man1
 
 CONVFILES = \
 	jpeg2ps.c psimage.h readjpeg.c asc85ec.c getopt.c	\
@@ -76,8 +78,8 @@
 	nesrin.eps
 
 install: jpeg2ps$(EXE)
-	cp jpeg2ps$(EXE) $(BINDIR)
-	cp jpeg2ps.1 $(MANDIR)
+	${BSD_INSTALL_PROGRAM} jpeg2ps$(EXE) $(BINDIR)
+	${BSD_INSTALL_DATA} jpeg2ps.1 $(MANDIR)
 
 uninstall:
 	rm -f $(BINDIR)/jpeg2ps$(EXE)
OpenPOWER on IntegriCloud