$NetBSD: patch-au,v 1.5 2019/11/08 03:09:22 kivinen Exp $

Libtoolize.

--- src/x_system/makefile.orig	Wed Apr 11 19:58:09 2001
+++ src/x_system/makefile
@@ -23,7 +23,7 @@
 #
 
 CFLAGS	= $(CC_OPT) $(WIN32) -I$(srcdir) -I../mgg -I$(NETCDF)/include
-ALLLIB  = -L../mgg -lgmt_mgg -L.. -L$(libdir) -lgmt -lpsl -L$(NETCDF)/lib -lnetcdf $(LIBS)
+ALLLIB  = ../mgg/libgmt_mgg.la ../libgmt.la ../libgmtpsl.la -Wl,-R$(NETCDF)/lib -L$(NETCDF)/lib -lnetcdf $(LIBS)
 
 ALL_C	= x_edit.c x_init.c x_list.c x_over.c x_report.c x_remove.c x_setup.c x_solve_dc_drift.c x_update.c
 
@@ -37,7 +37,7 @@
 
 install:	all
 		for i in $(ALL); do \
-			$(INSTALL) $$i$(EXE) $(bindir); \
+			$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXE) $(bindir); \
 		done
 
 uninstall:
@@ -57,10 +57,10 @@
 #	program dependencies
 #-------------------------------------------------------------------------------
 
-$(ALL):		$(ALL_O) $(GMTLIB)
-		$(CC) $(CFLAGS) $(LDFLAGS) $@.o $(ALLLIB) -o $@
+$(ALL):		$(ALL_O)
+		@$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $@.lo $(ALLLIB) -o $@
 
 .c.o:
-		$(CC) -c $(CFLAGS) $<
+		@$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) -c $(CFLAGS) $<
 
 $(ALL_O):	x_system.h $(GMT_H)
