summaryrefslogtreecommitdiff
path: root/comms/plp/patches/patch-af
blob: f46971843f0c918ea942b4095e0d68f79acbf1c0 (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
$NetBSD: patch-af,v 1.6 2002/11/14 23:58:34 jlam Exp $

--- Makefile.orig	Tue Nov  2 16:05:02 1999
+++ Makefile
@@ -16,18 +16,12 @@
 
 # Compiler & flags
 INCLUDE=-I../utils
-CFLAGS= -Wall -g -O2
-CC=g++ $(CFLAGS) $(INCLUDE)
+CFLAGS+= -Wall -g -O2
+CC=$(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDE)
 
 # Linker and flags
-LIBDIR=-L../utils
-# Solaris users uncomment this line instead of the next one
-#LIBS=-lutils -lsocket -lnsl
-LIBS=-lutils
-LD=g++ $(LIBDIR)
-
-# Archiver
-AR=ar -cr
+LIBS=../utils/libplputils.la
+LD=$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS)
 
 #######################################
 # You shouldn't need to look any further..
@@ -38,20 +32,23 @@
 export LD
 export LIBS
 
-all: bin/ncp bin/rfsv
+all: _utils _ncp _rfsv
+	rm -f bin/ncp bin/rfsv
+	ln -s ../ncp/ncp bin/ncp
+	ln -s ../rfsv/rfsv bin/rfsv
+
+_utils:
+	cd utils; $(MAKE)
 
-bin/ncp: $(wildcard ncp/*.cc) ncp utils/libutils.a
+_ncp:
 	cd ncp; $(MAKE)
 
-bin/rfsv: $(wildcard rfsv/*.cc) utils/libutils.a
+_rfsv:
 	cd rfsv; $(MAKE)
 
-utils/libutils.a:
-	cd utils; $(MAKE)
-
-install:
-	cp bin/rfsv /usr/local/bin/rfsv
-	cp bin/ncp /usr/local/bin/ncp
+install: all
+	cp rfsv/rfsv /usr/local/bin/rfsv
+	cp ncp/ncp /usr/local/bin/ncp
 
 clean:
 	cd utils; $(MAKE) clean
@@ -59,7 +56,7 @@
 	cd rfsv; $(MAKE) clean
 	rm -f ncp.log *~ core
 
-test: bin/ncp bin/rfsv
+test: all
 	PATH=`pwd`/bin:$${PATH}; export PATH;\
 		rfsv dir "C:/documents/"
 	@echo