aboutsummaryrefslogtreecommitdiff
path: root/devel/cdecl/files/patch-Makefile
blob: 9bb87ca90f13cecfca5f63792a4be0261c018be9 (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
--- Makefile.orig	1996-01-16 05:36:38 UTC
+++ Makefile
@@ -15,13 +15,13 @@
 #
 # add -DUSE_READLINE	To compile in support for the GNU readline library.
 
-CFLAGS= -s -O2 -DUSE_READLINE
-CC= gcc
-LIBS= -lreadline -ltermcap
+CFLAGS+= -s -DUSE_READLINE ${CPPFLAGS}
+CC?= gcc
+LIBS= -lreadline -lncurses ${LDFLAGS}
 ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
-BINDIR= /usr/bin
-MANDIR= /usr/man/man1
-CATDIR= /usr/man/cat1
+BINDIR= $(PREFIX)/bin
+MANDIR= $(PREFIX)/man/man1
+CATDIR= $(PREFIX)/man/cat1
 INSTALL= install -c
 INSTALL_DATA= install -c -m 644
 
@@ -43,10 +43,10 @@ test:
 	./c++decl < testset++
 
 install: cdecl
-	$(INSTALL) cdecl $(BINDIR)
-	ln $(BINDIR)/cdecl $(BINDIR)/c++decl
-	$(INSTALL_DATA) cdecl.1 $(MANDIR)
-	$(INSTALL_DATA) c++decl.1 $(MANDIR)
+	${BSD_INSTALL_PROGRAM} cdecl $(STAGEDIR)$(BINDIR)
+	ln -s $(BINDIR)/cdecl $(STAGEDIR)$(BINDIR)/c++decl
+	${BSD_INSTALL_MAN} cdecl.1 $(STAGEDIR)$(MANDIR)
+	ln -s $(MANDIR)/cdecl.1 $(STAGEDIR)$(MANDIR)/c++decl.1
 
 clean:
 	rm -f cdgram.c cdlex.c cdecl y.output c++decl