138 lines
4.3 KiB
Text
138 lines
4.3 KiB
Text
$NetBSD: patch-aa,v 1.9 2008/06/12 02:14:31 joerg Exp $
|
|
|
|
Libtoolize.
|
|
|
|
--- src/Makefile.orig 2006-11-01 16:41:02.000000000 +0000
|
|
+++ src/Makefile
|
|
@@ -43,7 +43,7 @@ include makegmt.macros # GMT-specific se
|
|
NETCDFLIB = $(NETCDF)/lib
|
|
NETCDFINC = $(NETCDF)/include
|
|
CFLAGS = -I$(NETCDFINC) $(WIN32) $(CC_OPT) -DGMT_DEFAULT_PATH=\"$(GMT_DEFAULT_PATH)\" $(TRIANGLE_D)
|
|
-CDF = -L$(NETCDFLIB) -lnetcdf
|
|
+CDF = -Wl,-R$(NETCDFLIB) -L$(NETCDFLIB) -lnetcdf
|
|
|
|
PS = -lpsl
|
|
GMT = -lgmt
|
|
@@ -151,38 +151,34 @@ gmt_notposix.h:
|
|
./configure
|
|
|
|
install: all
|
|
- if [ ! -d $(bindir) ]; then \
|
|
- mkdir -p $(bindir); \
|
|
- fi
|
|
- for i in $(ALLPROGS); do \
|
|
- $(INSTALL) $$i$(EXE) $(bindir); \
|
|
- done
|
|
- $(INSTALL) GMT $(bindir)
|
|
if [ ! -d $(libdir) ]; then \
|
|
mkdir -p $(libdir); \
|
|
fi
|
|
if [ ! $(libdir) = $(srcdir) ]; then \
|
|
rm -f $(libdir)/libpsl.* $(libdir)/libgmt.* $(libdir)/libgmtps.*; \
|
|
- $(INSTALL) -m 444 libpsl.a $(libdir); \
|
|
- $(INSTALL) -m 444 libgmt.a $(libdir); \
|
|
- $(INSTALL) -m 444 libgmtps.a $(libdir); \
|
|
- if [ -f libpsl.$(SL) ]; then \
|
|
- $(INSTALL) -m 444 libpsl.$(SL) $(libdir); \
|
|
- $(INSTALL) -m 444 libgmt.$(SL) $(libdir); \
|
|
- $(INSTALL) -m 444 libgmtps.$(SL) $(libdir); \
|
|
- fi; \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) libpsl.la $(libdir); \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) libgmt.la $(libdir); \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) libgmtps.la $(libdir); \
|
|
fi
|
|
if [ ! -d $(includedir) ]; then \
|
|
mkdir -p $(includedir); \
|
|
fi
|
|
if [ ! $(includedir) = $(srcdir) ]; then \
|
|
for i in $(GMT_H); do \
|
|
- $(INSTALL) -m 444 $$i $(includedir); \
|
|
+ $(INSTALL_DATA) $$i $(includedir); \
|
|
done; \
|
|
for i in $(PS_H) $(PS_I); do \
|
|
- $(INSTALL) -m 444 $$i $(includedir); \
|
|
+ $(INSTALL_DATA) $$i $(includedir); \
|
|
done; \
|
|
fi
|
|
+ if [ ! -d $(bindir) ]; then \
|
|
+ mkdir -p $(bindir); \
|
|
+ fi
|
|
+ for i in $(ALLPROGS); do \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXE) $(bindir); \
|
|
+ done
|
|
+ $(INSTALL) GMT $(bindir)
|
|
+
|
|
|
|
uninstall:
|
|
for i in $(ALLPROGS); do \
|
|
@@ -207,13 +203,13 @@ uninstall:
|
|
fi
|
|
|
|
clean:
|
|
- rm -f *.o *.a *.$(SL)
|
|
+ rm -f *.o *.a *.lo *.$(SL)
|
|
for i in $(ALLPROGS); do \
|
|
rm -f $$i$(EXE); \
|
|
done
|
|
|
|
spotless: clean
|
|
- rm -f $(GMTLIB) gmt_notposix.h makegmt.macros *.man
|
|
+ rm -fr .libs $(GMTLIB) gmt_notposix.h makegmt.macros *.man
|
|
touch makegmt.macros
|
|
|
|
distclean: spotless
|
|
@@ -225,40 +221,32 @@ distclean: spotless
|
|
libs: $(GMTLIB)
|
|
|
|
pslib.o: pslib.c $(PS_H) $(PS_I) gmt_notunix.h gmt_notposix.h gmt_math.h
|
|
- $(CC) $(CFLAGS) -c pslib.c
|
|
-
|
|
-./libpsl.a: pslib.o
|
|
- $(AR) cvur libpsl.a $?
|
|
- $(RANLIB) libpsl.a
|
|
-
|
|
-./libgmt.a: $(LIB_O) $(TRIANGLE_O) $(ALPHA_SINCOS_O)
|
|
- $(AR) cvur $@ $?
|
|
- $(RANLIB) $@
|
|
-
|
|
-./libgmtps.a: $(LIBPS_O)
|
|
- $(AR) cvur $@ $?
|
|
- $(RANLIB) $@
|
|
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c pslib.c
|
|
|
|
-./libpsl.$(SL): pslib.o
|
|
- $(LD) $(LD_OPT) $? -o $@
|
|
+libpsl.la: pslib.o
|
|
+ @$(LIBTOOL) --mode=link $(CC) -o $@ pslib.lo $(LDFLAGS) -lm --version-info 0:0 -rpath $(PLAIN_LIBDIR)
|
|
|
|
-./libgmt.$(SL): $(LIB_O) $(TRIANGLE_O) $(ALPHA_SINCOS_O)
|
|
- $(LD) $(LD_OPT) $(LIB_O) $(TRIANGLE_O) $(ALPHA_SINCOS_O) -o $@
|
|
+libgmt.la: $(LIB_O) $(TRIANGLE_O) $(ALPHA_SINCOS_O)
|
|
+ @$(LIBTOOL) --mode=link $(CC) -o $@ $(LIB_O:.o=.lo) \
|
|
+ $(TRIANGLE_O:.o=.lo) $(ALPHA_SINCOS_O:.o=.lo) $(LDFLAGS) \
|
|
+ $(CDF) $(LIBS) --version-info 0:0 -rpath $(PLAIN_LIBDIR)
|
|
|
|
-./libgmtps.$(SL): $(LIBPS_O)
|
|
- $(LD) $(LD_OPT) $(LIBPS_O) -o $@
|
|
+libgmtps.la: $(LIBPS_O)
|
|
+ @$(LIBTOOL) --mode=link $(CC) -o $@ $(LIBPS_O:.o=.lo) $(LDFLAGS) -lm --version-info 0:0 -rpath $(PLAIN_LIBDIR)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# program dependencies
|
|
#-------------------------------------------------------------------------------
|
|
|
|
$(PROGS): $(GMTLIB) $(PROGS_O)
|
|
- $(CC) $(CFLAGS) $@.o -L. $(GMT) $(CDF) $(LIBS) $(LDFLAGS) -o $@
|
|
+ @$(LIBTOOL) --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) $@.o \
|
|
+ libgmt.la libpsl.la $(CDF) $(LIBS) $(LDFLAGS) -o $@
|
|
$(COMPRESS) $@$(EXE)
|
|
|
|
$(PROGSPS): $(GMTLIB) $(PROGSPS_O)
|
|
- $(CC) $(CFLAGS) $@.o -L. $(GMT) $(GMTPS) $(PS) $(CDF) $(LIBS) $(LDFLAGS) -o $@
|
|
+ @$(LIBTOOL) --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) $@.o \
|
|
+ libgmt.la libgmtps.la libpsl.la $(CDF) $(LIBS) $(LDFLAGS) -o $@
|
|
$(COMPRESS) $@$(EXE)
|
|
|
|
.c.o:
|
|
- $(CC) -c $(CFLAGS) $<
|
|
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|