summaryrefslogtreecommitdiff
path: root/graphics/GMT/patches/patch-ao
blob: 13d953aa4cfd775e586e5b5af242b37837285052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ao,v 1.3 2005/06/22 08:34:54 jlam Exp $

--- ./src/imgsrc/makefile.orig	Wed Apr 11 19:58:09 2001
+++ ./src/imgsrc/makefile
@@ -6,25 +6,25 @@
 
 include ../makegmt.macros
 
-CDF		= -L$(NETCDF)/lib -lnetcdf
-GMT		= -L.. -L$(libdir) -lgmt -lpsl
+CDF		= -Wl,-R$(NETCDF)/lib -L$(NETCDF)/lib -lnetcdf
+GMT		= ../libgmt.la ../libpsl.la
 CFLAGS		= $(CC_OPT) $(WIN32) -I$(srcdir) -I$(NETCDF)/include
 
 all:		img2mercgrd
 
 install:	all
-		$(INSTALL) img2mercgrd$(EXE) $(bindir)
-		$(INSTALL) img2grd $(bindir)
+		@$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) img2mercgrd$(EXE) $(bindir)
+		@$(LIBTOOL) --mode=install $(INSTALL_SCRIPT) img2grd $(bindir)
 
 uninstall:
 		\rm -f $(bindir)/img2mercgrd$(EXE) $(bindir)/img2grd
 
 img2mercgrd:	img2mercgrd.o gmt_imgsubs.o
-		$(CC) $(CFLAGS) $(LDFLAGS) img2mercgrd.o gmt_imgsubs.o $(GMT) $(CDF) $(LIBS) -o img2mercgrd
+		@$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) img2mercgrd.lo gmt_imgsubs.lo $(GMT) $(CDF) $(LIBS) -o img2mercgrd
 
 spotless:	clean
 
 clean:	
 		rm -f *.o img2mercgrd$(EXE)
 .c.o:
-		$(CC) -c $(CFLAGS) $<
+		@$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) -c $(CFLAGS) $<