From f953deff1ee3cebc57529bee6ba864bb99d7391a Mon Sep 17 00:00:00 2001
From: Douglas Guptill <douglas.guptill@dal.ca>
Date: Fri, 29 May 2009 00:24:30 +0000
Subject: [PATCH] tweaks

---
 CASCADE/Makefile  | 9 +++++----
 Makefile.p690     | 8 ++++----
 NN/Makefile       | 9 +++++----
 OCTREE/Makefile   | 9 +++++----
 RESAMPLE/Makefile | 9 +++++----
 5 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/CASCADE/Makefile b/CASCADE/Makefile
index 4aa150ef..80c671ef 100644
--- a/CASCADE/Makefile
+++ b/CASCADE/Makefile
@@ -9,6 +9,7 @@
 
 NAME=cascade
 include ../Makefile.p690
+LIBFILE=lib$(NAME)$(BITS).a
 
 # object (all the interesting bits to do the erosion/sedimentation
 #         computations)
@@ -49,9 +50,9 @@ del_flip.o
 
 # make the library
 #
-all: lib$(NAME).a
-lib$(NAME).a: $(OBJECTS) $(UTILS)
-	$(AR) -rv lib$(NAME).a $(OBJECTS)
+all: $(LIBFILE)
+$(LIBFILE): $(OBJECTS) $(UTILS)
+	$(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar
 	echo "--"
 	echo "compiler output...."
 	more $(COMPILE_OUT)
@@ -62,5 +63,5 @@ objclean:
 
 .PHONY: clean
 clean: objclean
-	rm -f lib$(NAME).a
+	rm -f $(LIBFILE)
 
diff --git a/Makefile.p690 b/Makefile.p690
index a5ae11b2..c6dc6004 100644
--- a/Makefile.p690
+++ b/Makefile.p690
@@ -45,10 +45,10 @@ CFLAGS  = -O2 -qstrict -Q $(BITS)  -qarch=pwr4 -qtune=pwr4 \
 # -lacml
 
 LIBS = \
--LOCTREE -lOctree \
--LNN -lnn \
--LCASCADE -lcascade \
--LRESAMPLE -lresample \
+-LOCTREE -lOctree$(BITS) \
+-LNN -lnn$(BITS) \
+-LCASCADE -lcascade$(BITS) \
+-LRESAMPLE -lresample$(BITS) \
 $(WSMP_LIB) \
 -L$(X11) -lX11 \
 -L$(PGPLOT) -lpgplot \
diff --git a/NN/Makefile b/NN/Makefile
index e78329de..78897ae5 100644
--- a/NN/Makefile
+++ b/NN/Makefile
@@ -1,5 +1,6 @@
 NAME=nn
 include ../Makefile.p690
+LIBFILE=lib$(NAME)$(BITS).a
 
 OBJECTS_NN = \
 delaun.o \
@@ -11,9 +12,9 @@ stack.o \
 stackpair.o \
 volume.o
 
-all: lib$(NAME).a
-lib$(NAME).a: $(OBJECTS_NN)
-	$(AR) rcv lib$(NAME).a $(OBJECTS_NN)
+all: $(LIBFILE)
+$(LIBFILE): $(OBJECTS_NN)
+	$(AR) -rv $(LIBFILE) $(OBJECTS_NN) >$(LIBFILE).ar
 	echo "--"
 	echo "compiler output...."
 	more $(COMPILE_OUT)
@@ -24,5 +25,5 @@ objclean:
 
 .PHONY: clean
 clean: objclean
-	rm -f lib$(NAME).a
+	rm -f $(LIBFILE)
 
diff --git a/OCTREE/Makefile b/OCTREE/Makefile
index 7b3f1416..30f85da8 100644
--- a/OCTREE/Makefile
+++ b/OCTREE/Makefile
@@ -1,5 +1,6 @@
 NAME=Octree
 include ../Makefile.p690
+LIBFILE=lib$(NAME)$(BITS).a
 
 OBJECTS_OCTREE = \
 OctreeBitPlus.o \
@@ -12,9 +13,9 @@ profil_sloan.o \
 rootls_sloan.o
 
 
-all: lib$(NAME).a
-lib$(NAME).a: $(OBJECTS_OCTREE)
-	$(AR) rcv lib$(NAME).a $(OBJECTS_OCTREE)
+all: $(LIBFILE)
+$(LIBFILE): $(OBJECTS_OCTREE)
+	$(AR) -rv $(LIBFILE) $(OBJECTS_OCTREE) >$(LIBFILE).ar
 	echo "--"
 	echo "compiler output...."
 	more $(COMPILE_OUT)
@@ -25,5 +26,5 @@ objclean:
 
 .PHONY: clean
 clean: objclean
-	rm -f lib$(NAME).a
+	rm -f $(LIBFILE)
 
diff --git a/RESAMPLE/Makefile b/RESAMPLE/Makefile
index 0883e3b4..ee403f92 100644
--- a/RESAMPLE/Makefile
+++ b/RESAMPLE/Makefile
@@ -1,5 +1,6 @@
 NAME=resample
 include ../Makefile.p690
+LIBFILE=lib$(NAME)$(BITS).a
 
 OBJECTS = \
 curfit.o \
@@ -16,9 +17,9 @@ curfit.o \
 splev.o \
 resample.o
 
-all: lib$(NAME).a
-lib$(NAME).a: $(OBJECTS)
-	$(AR) rcv lib$(NAME).a $(OBJECTS)
+all: $(LIBFILE)
+$(LIBFILE): $(OBJECTS)
+	$(AR) -rv $(LIBFILE) $(OBJECTS) >$(LIBFILE).ar
 	echo "--"
 	echo "compiler output...."
 	more $(COMPILE_OUT)
@@ -29,5 +30,5 @@ objclean:
 
 .PHONY: clean
 clean: objclean
-	rm -f lib$(NAME).a
+	rm -f $(LIBFILE)
 
-- 
GitLab