62 lines
2.1 KiB
Text
62 lines
2.1 KiB
Text
$NetBSD: patch-at,v 1.8 2008/06/12 02:14:31 joerg Exp $
|
|
|
|
Libtoolize.
|
|
|
|
--- src/x2sys/makefile.orig 2003-05-01 14:08:38.000000000 +0300
|
|
+++ src/x2sys/makefile 2003-05-01 14:09:44.000000000 +0300
|
|
@@ -9,7 +9,7 @@
|
|
#------------------------- stop here --------------------------
|
|
|
|
CFLAGS = $(CC_OPT) $(WIN32) -I$(srcdir) -I../mgg -I../mgd77 -I$(NETCDF)/include
|
|
-ALLLIB = -L../mgd77 -lmgd77 -L../mgg -lgmt_mgg -L.. -L$(libdir) -lgmt -lpsl -L$(NETCDF)/lib -lnetcdf $(LIBS)
|
|
+ALLLIB = ../mgd77/libmgd77.la ../mgg/libgmt_mgg.la ../libgmt.la ../libpsl.la -Wl,-R$(NETCDF)/lib -L$(NETCDF)/lib -lnetcdf $(LIBS)
|
|
|
|
XSYSTEM_H = x2sys.h
|
|
XSYSTEM_C = x2sys_init.c x2sys_put.c x2sys_get.c x2sys_binlist.c x2sys_datalist.c x2sys_cross.c
|
|
@@ -20,26 +20,23 @@
|
|
|
|
#---------------------------------------------------------------
|
|
|
|
-all: $(XSYSTEM) libx2sys.a
|
|
+all: $(XSYSTEM) libx2sys.la
|
|
|
|
-libx2sys.a: x2sys.o
|
|
- $(AR) cvr libx2sys.a $?
|
|
- $(RANLIB) libx2sys.a
|
|
+libx2sys.la: x2sys.o
|
|
+ $(LIBTOOL) --mode=link $(CC) -o libx2sys.la x2sys.lo --version-info 0:0 -rpath $(PLAIN_LIBDIR)
|
|
|
|
install: all
|
|
- for i in $(XSYSTEM); do \
|
|
- $(INSTALL) $$i$(EXE) $(bindir); \
|
|
- done
|
|
if [ ! -d $(libdir) ]; then \
|
|
mkdir -p $(libdir); \
|
|
fi
|
|
if [ ! $(libdir) = $(srcdir) ]; then \
|
|
rm -f $(libdir)/libx2sys.*; \
|
|
- $(INSTALL) -m 444 libx2sys.a $(libdir); \
|
|
- if [ -f libx2sys.$(SL) ]; then \
|
|
- $(INSTALL) -m 444 libx2sys.$(SL) $(libdir); \
|
|
- fi; \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) libx2sys.la $(libdir); \
|
|
fi
|
|
+ for i in $(XSYSTEM); do \
|
|
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXE) $(bindir); \
|
|
+ done
|
|
+
|
|
if [ ! -d $(datadir)/x2sys ]; then \
|
|
mkdir -p $(datadir)/x2sys; \
|
|
fi
|
|
@@ -68,8 +65,8 @@
|
|
spotless: clean
|
|
\rm -f *.a
|
|
|
|
-$(XSYSTEM): $(XSYSTEM_O) libx2sys.a $(GMTLIB)
|
|
- $(CC) $(CFLAGS) $@.o -o $@ -L. -lx2sys $(ALLLIB) $(LDFLAGS)
|
|
+$(XSYSTEM): $(XSYSTEM_O) libx2sys.la
|
|
+ @$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $@.lo -o $@ libx2sys.la $(ALLLIB) $(LDFLAGS)
|
|
|
|
.c.o: $(XSYSTEM_H) $(GMT_H)
|
|
- $(CC) -c $(CFLAGS) $<
|
|
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|