summaryrefslogtreecommitdiff
path: root/print/c2ps/files/patch-Makefile
blob: 416d95e08a8ae51f232a058557a94fd875242aa1 (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
--- Makefile.orig	1997-05-16 00:50:56.000000000 +0900
+++ Makefile	2013-05-04 04:02:28.000000000 +0900
@@ -2,12 +2,13 @@
 # Last modified: Sat Apr 19 1997
 
 RM	= 	rm -f
-CC	=	gcc
-CCFLAGS =       -O
+CC?	=	gcc
+CCFLAGS?=       ${CFLAGS}
 
-PREFIX	=	/usr/local
+PREFIX?=	/usr/local
 BIN	=	$(PREFIX)/bin
-MAN	=	$(PREFIX)/man/man1
+MAN1PREFIX?=	${PREFIX}
+MAN	=	${MAN1PREFIX}/man/man1
 
 # you may predefine some of the default settings
 DEFAULT_FONT	= \"Courier\"
@@ -31,21 +32,20 @@
  -DSTRINGS=$(STRINGS_FONT) -DPREPROC=$(PREPROC_FONT)\
  -DKEYWORD=$(KEYWORD_FONT) -DTYPE=$(TYPE_FONT)\
  -DLNUMBER=$(LNUMBER_FONT) -DFUNCTION=$(FUNCTION_FONT)\
- -DDIM=$(COMMENT_DIMMING_DEGREE)\
- -D$(DEFAULT_PAPER_TYPE)
+ -DDIM=$(COMMENT_DIMMING_DEGREE)
 
 all:		compile
 
 install:	bininstall maninstall
 
 bininstall:	c2ps
-	install -m 755 c2ps $(BIN)
+	${BSD_INSTALL_PROGRAM} c2ps $(BIN)
 
 maninstall:	c2ps.1
-	install -m 644 c2ps.1 $(MAN)
+	${BSD_INSTALL_DATA} c2ps.1 $(MAN)
 
 compile:	c2ps.c
-	$(CC) $(PREP_OPTIONS) $(CCFLAGS) -o c2ps c2ps.c
+	$(CC) $(PREP_OPTIONS) $(CCFLAGS) $(CPPFLAGS) -o c2ps c2ps.c -L${LOCALBASE}/lib -lm -lpaper
 
 clean:
 	$(RM) c2ps *.o core *~