68 lines
2.2 KiB
Text
68 lines
2.2 KiB
Text
$NetBSD: patch-al,v 1.6 2008/06/12 02:14:31 joerg Exp $
|
|
|
|
Libtoolize.
|
|
|
|
--- src/mgg/makefile.orig Wed Apr 11 19:58:09 2001
|
|
+++ src/mgg/makefile
|
|
@@ -24,7 +24,7 @@
|
|
include ../gmtalldeps.macros
|
|
|
|
CFLAGS = $(CC_OPT) $(WIN32) -I$(srcdir) -I$(NETCDF)/include
|
|
-CDF = -L$(NETCDF)/lib -lnetcdf
|
|
+CDF = -Wl,-R$(NETCDF)/lib -L$(NETCDF)/lib -lnetcdf
|
|
|
|
MGG_H = gmt_mgg.h
|
|
|
|
@@ -54,19 +54,17 @@
|
|
#-------------------------------------------------------------------------------
|
|
|
|
install: all
|
|
- for i in $(MGG) $(MGGPS); do \
|
|
- $(INSTALL) $$i$(EXE) $(bindir); \
|
|
- done
|
|
if [ ! -d $(libdir) ]; then \
|
|
mkdir -p $(libdir); \
|
|
fi
|
|
if [ ! $(libdir) = $(srcdir) ]; then \
|
|
rm -f $(libdir)/libgmt_mgg.*; \
|
|
- $(INSTALL) -m 444 libgmt_mgg.a $(libdir); \
|
|
- if [ -f libgmt_mgg.$(SL) ]; then \
|
|
- $(INSTALL) -m 444 libgmt_mgg.$(SL) $(libdir); \
|
|
- fi; \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) libgmt_mgg.la $(libdir); \
|
|
fi
|
|
+ for i in $(MGG) $(MGGPS); do \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXE) $(bindir); \
|
|
+ done
|
|
+
|
|
|
|
uninstall:
|
|
for i in $(MGG) $(MGGPS); do \
|
|
@@ -93,8 +91,7 @@
|
|
#-------------------------------------------------------------------------------
|
|
|
|
libgmt_mgg.a: gmt_mgg.o
|
|
- $(AR) cvr libgmt_mgg.a $?
|
|
- $(RANLIB) libgmt_mgg.a
|
|
+ @$(LIBTOOL) --mode=link $(CC) -o libgmt_mgg.la gmt_mgg.lo --version-info 0:0 -rpath $(PLAIN_LIBDIR)
|
|
|
|
gmt_mgg.o: $(MGG_H)
|
|
|
|
@@ -102,11 +99,12 @@
|
|
# program dependencies
|
|
#-------------------------------------------------------------------------------
|
|
|
|
-$(MGG): libgmt_mgg.a $(MGG_O) $(GMTLIB)
|
|
- $(CC) $(CFLAGS) $(LDFLAGS) $@.o -L. -lgmt_mgg -L.. -L$(libdir) -lgmt $(CDF) $(LIBS) -o $@
|
|
+$(MGG): libgmt_mgg.a $(MGG_O)
|
|
+ @$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $@.o libgmt_mgg.la ../libpsl.la ../libgmt.la $(CDF) $(LIBS) -o $@
|
|
+
|
|
|
|
-$(MGGPS): libgmt_mgg.a $(MGGPS_O) $(GMTLIB)
|
|
- $(CC) $(CFLAGS) $(LDFLAGS) $@.o -L. -lgmt_mgg -L.. -L$(libdir) -lgmt -lgmtps -lpsl $(CDF) $(LIBS) -o $@
|
|
+$(MGGPS): libgmt_mgg.a $(MGGPS_O)
|
|
+ @$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $@.o libgmt_mgg.la ../libgmt.la ../libgmtps.la ../libpsl.la $(CDF) $(LIBS) -o $@
|
|
|
|
.c.o:
|
|
- $(CC) -c $(CFLAGS) $<
|
|
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|