summaryrefslogtreecommitdiff
blob: a00206ea739d1cec100d9f453f23f31e01038af6 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
--- cdat_lite-6.0rc2/libcdms/Makefile.in
+++ cdat_lite-6.0rc2/libcdms/Makefile.in
@@ -44,15 +44,15 @@
 PARMDIR=$(prefix)/lib/lats
 
 CC = @CC@
-CFLAGS = -I../../include @CFLAGS@ $(DEBUG) -Dgrads @GRIB2INC@ @GRIB2OPTS@
+CFLAGS = -fPIC -I../../include @CFLAGS@ -Dgrads @GRIB2INC@ @GRIB2OPTS@
 CPPFLAGS = @CPPFLAGS@
 DEBUG = -O
 DEFS = @DEFS@
 FC = @FC@
-FFLAGS = -I../../include @FFLAGS@ $(DEBUG)
+FFLAGS = -I../../include @FFLAGS@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LDFLAGS = -L../../../lib -lcdms @NCOPTS@ @HDFOPTS@ @DRSOPTS@ @LIBS@ @GRIB2LIB@
+LDFLAGS += -L../../../lib -lcdms @NCOPTS@ @HDFOPTS@ @DRSOPTS@ @LIBS@ @GRIB2LIB@
 OS = @OS@
 RANLIB = @RANLIB@
 
--- cdat_lite-6.0rc2/libcdms/src/db_util/Makefile.in
+++ cdat_lite-6.0rc2/libcdms/src/db_util/Makefile.in
@@ -38,17 +38,18 @@
 PARMDIR=$(prefix)/lib/lats
 
 CC = @CC@
-CFLAGS = -I../../include @CFLAGS@ $(DEBUG) -Dgrads
+CFLAGS = -fPIC -I../../include @CFLAGS@ -Dgrads
 CPPFLAGS = @CPPFLAGS@
 DEBUG = -O
 DEFS = @DEFS@
 FC = @FC@
-FFLAGS = -I../../include @FFLAGS@ $(DEBUG)
+FFLAGS = -I../../include @FFLAGS@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LDFLAGS = -L../../../lib -lcdms @NCOPTS@ @DRSOPTS@ @LIBS@
+LDFLAGS += -L../../../lib -lcdms @NCOPTS@ @DRSOPTS@ @LIBS@
 OS = @OS@
 RANLIB = @RANLIB@
+AR ?= ar
 
 # Shell to run make subcommands
 SHELL = /bin/sh
@@ -60,7 +61,7 @@
 		  cdUtil.o
 
 all:		$(OBJS) FORCE
-		ar rv $(LIBRARY) $(OBJS)
+		$(AR) rv $(LIBRARY) $(OBJS)
 		$(RANLIB) $(LIBRARY)
 
 cdTimeConv.o:	cdTimeConv.c ../../include/cdmsint.h ../../include/cdms.h ../../include/cdunif.h
--- cdat_lite-6.0rc2/libcdms/src/cdunif/Makefile.in
+++ cdat_lite-6.0rc2/libcdms/src/cdunif/Makefile.in
@@ -47,29 +47,29 @@
 PARMDIR=$(prefix)/lib/lats
 
 # Set the compiler flag for the 64-bit Opteron platform
+CC = @CC@
 ARCH=$(shell uname -m)
 ifeq ($(ARCH),x86_64)
-   CC = gcc -fPIC -D__x86_64__
-else
-   CC = @CC@
+   CC += -fPIC -D__x86_64__
 endif
 
 ifneq (@GRIB2INC@,)
-  CFLAGS = -I../../include -I"@NCINC@" -I@HDFINC@ -I@DRSINC@ @CFLAGS@ $(DEBUG) -Dgrads -I@GRIB2INC@ @GRIB2OPTS@
+  CFLAGS = -I../../include -I"@NCINC@" -I@HDFINC@ -I@DRSINC@ @CFLAGS@ -Dgrads -I@GRIB2INC@ @GRIB2OPTS@
 else
-  CFLAGS = -I../../include -I"@NCINC@" -I@HDFINC@ -I@DRSINC@ @CFLAGS@ $(DEBUG) -Dgrads
+  CFLAGS = -I../../include -I"@NCINC@" -I@HDFINC@ -I@DRSINC@ @CFLAGS@ -Dgrads
 endif
 
-CPPFLAGS = @CPPFLAGS@ -DSTNDALN=1 -DBYTEORDER=@GRADS_BYTEORDER@ -DGRADS_CRAY=@GRADS_CRAY@ @QLOPTS@ @PPOPTS@ @GRIB2OPTS@
+CPPFLAGS += @CPPFLAGS@ -DSTNDALN=1 -DBYTEORDER=@GRADS_BYTEORDER@ -DGRADS_CRAY=@GRADS_CRAY@ @QLOPTS@ @PPOPTS@ @GRIB2OPTS@
 DEBUG = -O
 DEFS = @DEFS@
 FC = @FC@
-FFLAGS = -I../../include @FFLAGS@ $(DEBUG)
+FFLAGS = -I../../include @FFLAGS@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LDFLAGS = -L../../../lib -lcdms @NCOPTS@ @HDFOPTS@ @DRSOPTS@ @LIBS@ @GRIB2LIB@
+LDFLAGS += -L../../../lib -lcdms @NCOPTS@ @HDFOPTS@ @DRSOPTS@ @LIBS@ @GRIB2LIB@
 OS = @OS@
 RANLIB = @RANLIB@
+AR ?= ar
 
 # Shell to run make subcommands
 SHELL = /bin/sh
@@ -80,7 +80,7 @@
 OBJS		= cdunif.o cdunifint.o cdunifgen.o cdunifdrs.o cdunifgrads.o cdunifnc.o cdunifhdf.o cdunifslab.o cdunifstub.o cdunifra.o cdrra.o cdsort.o gamach.o gaio.o gaprnt.o gautil.o gaddes.o galloc.o gabufr.o gabufrtbl.o cdunifql.o @GRADS_IEEE2CRAY_OBJECT@
 
 all:		$(OBJS) FORCE
-		ar rv $(LIBRARY) $(OBJS)
+		$(AR) rv $(LIBRARY) $(OBJS)
 		cd cdunifpp; $(MAKE) DEBUG=$(DEBUG)
 		$(RANLIB) $(LIBRARY)
 
--- cdat_lite-6.0rc2/libcdms/src/cdunif/cdunifpp/Makefile.in
+++ cdat_lite-6.0rc2/libcdms/src/cdunif/cdunifpp/Makefile.in
@@ -37,12 +37,13 @@
 # set to blank if you don't want to rename symbols in unpacking routines
 
 CC = @CC@
-CFLAGS = -I../../../include/cdunifpp -I@NCINC@ @CFLAGS@ -I../../../include $(DEBUG)
+CFLAGS = -fPIC -I../../../include/cdunifpp -I@NCINC@ @CFLAGS@ -I../../../include
 CPPFLAGS = @CPPFLAGS@ @PPOPTS@ -Uhdf
 LIBRARY = ../../../lib/libcdms.a
+AR ?= ar
 
 all: $(OBJS)
-	ar rv $(LIBRARY) $(OBJS)
+	$(AR) rv $(LIBRARY) $(OBJS)
 # (ranlib called by higher-level makefile)
 
 %.o: %.c $(HEADERS)
--- cdat_lite-6.0rc2/setup_util.py
+++ cdat_lite-6.0rc2/setup_util.py
@@ -296,8 +296,6 @@
             nc4_defs = ''
 
         self._system('cd libcdms ; '
-                     'CFLAGS="-fPIC" '
-                     'CC=%(cc)s '
                      'sh ./configure --disable-drs --disable-hdf '
                      '--disable-ql --with-ncinc=%(ncinc)s --with-ncincf=%(ncinc)s --with-nclib=%(nclib)s %(nc4)s'
                      % dict(ncinc=netcdf_config.netcdf_incdir, nclib=netcdf_config.netcdf_libdir,