pkgsrc/graphics/GMT/patches/patch-at
2003-05-01 11:31:46 +00:00

58 lines
1.8 KiB
Text

$NetBSD: patch-at,v 1.5 2003/05/01 11:31:46 kivinen Exp $
--- src/x2sys/makefile.orig 2003-05-01 14:08:38.000000000 +0300
+++ src/x2sys/makefile 2003-05-01 14:09:44.000000000 +0300
@@ -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 \
@@ -58,8 +54,8 @@
spotless: clean
\rm -f *.a
-$(XSYSTEM): $(XSYSTEM_O) libx2sys.a
- $(CC) $(CFLAGS) $@.o -o $@ -L. -lx2sys $(ALLLIB) $(LDFLAGS)
+$(XSYSTEM): $(XSYSTEM_O) libx2sys.la
+ @$(LIBTOOL) $(CC) $(CFLAGS) $@.lo -o $@ libx2sys.la $(ALLLIB) $(LDFLAGS)
.c.o:
- $(CC) -c $(CFLAGS) $<
+ @$(LIBTOOL) $(CC) $(CPPFLAGS) -c $(CFLAGS) $<