1acbced92d
GMT help script. Fix some patch fuzz. Install libgmt_mgg.la before the programs depending on it, saving some warnings from libtool.
56 lines
1.7 KiB
Text
56 lines
1.7 KiB
Text
$NetBSD: patch-at,v 1.4 2001/04/20 17:16:19 jtb Exp $
|
|
|
|
--- src/x2sys/makefile.orig Wed Apr 11 19:58:09 2001
|
|
+++ src/x2sys/makefile
|
|
@@ -7,7 +7,7 @@
|
|
#------------------------- stop here --------------------------
|
|
|
|
CFLAGS = $(CC_OPT) $(WIN32) -I$(srcdir) -I../mgg -I$(NETCDF)/include
|
|
-ALLLIB = -L.. -L$(libdir) -lgmt -L../mgg -lgmt_mgg -lpsl -L$(NETCDF)/lib -lnetcdf $(LIBS)
|
|
+ALLLIB = ../libgmt.la ../mgg/libgmt_mgg.la ../libpsl.la -Wl,-R$(NETCDF)/lib -L$(NETCDF)/lib -lnetcdf $(LIBS)
|
|
|
|
XSYSTEM_H = x2sys.h
|
|
XSYSTEM_C = x2sys_datalist.c x2sys_cross.c
|
|
@@ -18,25 +18,21 @@
|
|
|
|
#---------------------------------------------------------------
|
|
|
|
-libx2sys.a: x2sys.o
|
|
- $(AR) cvr libx2sys.a $?
|
|
- $(RANLIB) libx2sys.a
|
|
+libx2sys.la: x2sys.o
|
|
+ $(LIBTOOL) $(CC) -o libx2sys.la x2sys.lo --version-info 0:0 -rpath $(libdir)
|
|
|
|
-all: $(XSYSTEM) libx2sys.a
|
|
+all: libx2sys.la $(XSYSTEM)
|
|
|
|
install: all
|
|
- for i in $(XSYSTEM); do \
|
|
- $(INSTALL) $$i$(EXE) $(bindir); \
|
|
- done
|
|
if [ ! -d $(libdir) ]; then \
|
|
mkdir -p $(libdir); \
|
|
fi
|
|
if [ ! $(libdir) = $(srcdir) ]; then \
|
|
- $(INSTALL) -m 444 libx2sys.a $(libdir); \
|
|
- if [ -f libx2sys.$(SL) ]; then \
|
|
- $(INSTALL) -m 444 libx2sys.$(SL) $(libdir); \
|
|
- fi; \
|
|
+ $(LIBTOOL) $(INSTALL_DATA) libx2sys.la $(libdir); \
|
|
fi
|
|
+ for i in $(XSYSTEM); do \
|
|
+ $(LIBTOOL) $(INSTALL_PROGRAM) $$i$(EXE) $(bindir); \
|
|
+ done
|
|
|
|
uninstall:
|
|
for i in $(XSYSTEM); do \
|
|
@@ -59,7 +55,7 @@
|
|
\rm -f *.a
|
|
|
|
$(XSYSTEM): $(XSYSTEM_O) libx2sys.a
|
|
- $(CC) $(CFLAGS) $@.o -o $@ -L. -lx2sys $(ALLLIB) $(LDFLAGS)
|
|
+ @$(LIBTOOL) $(CC) $(CFLAGS) $@.lo -o $@ libx2sys.la $(ALLLIB) $(LDFLAGS)
|
|
|
|
.c.o:
|
|
- $(CC) -c $(CFLAGS) $<
|
|
+ @$(LIBTOOL) $(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|