blob: 9f1a522ac13e794b3bff64883ce37af86bebf085 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
$NetBSD: patch-bb,v 1.1 2006/11/14 13:16:00 wennmach Exp $
Libtoolize.
--- src/xgrid/makefile.in.orig 2006-11-08 22:19:31.000000000 +0100
+++ src/xgrid/makefile.in 2006-11-08 22:28:27.000000000 +0100
@@ -10,7 +10,7 @@
GMTSRCDIR = ..
include ../gmtalldeps.macros
-CDF = -L$(NETCDF)/lib -lnetcdf
+CDF = -Wl,-R$(NETCDF)/lib -L$(NETCDF)/lib -lnetcdf
OBJS= xgrid_utility.o xgrid_Xutility.o xgrid_Canvas.o \
xgrid_Panner.o xgrid_GMTgrid.o xgrid_controls.o \
@@ -21,14 +21,14 @@
# Location of GMT and CDF header files
CFLAGS= $(CC_OPT) $(WIN32) -I$(srcdir) -I$(NETCDF)/include @X_CFLAGS@ @CFLAGS@
-XLIBS=@X_PRE_LIBS@ @X_LIBS@ -lXaw -lXt -lXmu -lXext -lX11 @X_EXTRA_LIBS@ -L.. -L$(libdir) -lgmt -lpsl -lnetcdf
+XLIBS=@X_PRE_LIBS@ @X_LIBS@ -lXaw -lXt -lXmu -lXext -lX11 @X_EXTRA_LIBS@ ../libgmt.la ../libpsl.la $(CDF)
all: @buildtarget@
install: @buildtarget@ @installtarget@
xgridedit-install:
- $(INSTALL) xgridedit$(EXE) $(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xgridedit$(EXE) $(bindir)
uninstall:
\rm -f $(bindir)/xgridedit$(EXE)
@@ -37,15 +37,15 @@
\rm -f makefile config.cache config.log config.status
clean:
- rm -f *.o xgridedit$(EXE) .gmt*
+ rm -f *.o *.lo xgridedit$(EXE) .gmt*
-xgridedit: $(OBJS) $(EDITOBJS) xgridedit.o $(GMTLIB)
- $(CC) $(CFLAGS) xgridedit.o -o xgridedit $(OBJS) \
- $(EDITOBJS) $(CDF) $(XLIBS) $(LIBS) $(LDFLAGS)
+xgridedit: $(OBJS) $(EDITOBJS) xgridedit.o
+ @$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $@.o -o $@ \
+ $(OBJS) $(EDITOBJS) $(CDF) $(XLIBS) $(LIBS) $(LDFLAGS)
xgridedit.o: xGridEdit.c xgrid_utility.h xgrid_controls.h \
xgrid_messages.h xgrid_view.h xgrid_textInput.h $(GMT_H)
- $(CC) $(CFLAGS) -c xGridEdit.c -o xgridedit.o
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c xGridEdit.c -o xgridedit.o
xgrid_utility.o: xgrid_utility.h
@@ -71,3 +71,6 @@
xgrid_view.o: xgrid_utility.h xgrid_Xutility.h xgrid_GMTgrid.h \
xgrid_view.h $(GMT_H)
+
+.c.o:
+ @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|