pkgsrc/comms/plp/patches/patch-af
2004-09-08 12:47:39 +00:00

69 lines
1.4 KiB
Text

$NetBSD: patch-af,v 1.7 2004/09/08 12:47:39 wiz Exp $
--- Makefile.orig 1999-11-02 22:05:02.000000000 +0100
+++ 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 AR
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 @@ clean:
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