1 --- makefile.orig 2011-08-04 20:03:32.000000000 +0200
2 +++ makefile 2011-11-08 14:09:07.605580448 +0100
6 # Warning do not set both USE_NETCDF3 and USE_NETCDF4 to one
19 ifeq ($(USE_NETCDF3),1)
24 -g:=${cwd}/g2clib-1.2.1
26 -wLDFLAGS+=-L$g -lgrib2c
28 +glib:=/usr/lib/libgrib2c.a
29 +wLDFLAGS+=-L/usr/lib -lgrib2c
30 +wCPPFLAGS+=-I/usr/include
34 -j=${cwd}/jasper-1.900.1
35 -jlib=$j/src/libjasper/.libs/libjasper.a
36 -wLDFLAGS+=-L$j/src/libjasper/.libs -ljasper
37 -wCPPFLAGS+=-I$j/src/libjasper/include
39 +jlib=/usr/lib/libjasper.a
40 +wLDFLAGS+=-L/usr/lib -ljasper
41 +wCPPFLAGS+=-I/usr/include
43 ifeq ($(USE_NETCDF3),1)
44 n:=${cwd}/netcdf-3.6.2
48 ifeq ($(USE_NETCDF4),1)
49 - n4:=${cwd}/netcdf-4.1.1
50 - n4lib:=${n4}/libsrc4/.libs/libnetcdf.a
51 - h5:=${cwd}/hdf5-1.8.6
52 - h5lib:=${h5}/src/.libs/libhdf5.a
53 + n4lib:=/usr/lib/libnetcdf.a
56 # wLDFLAGS+=-L${n4}/libsrc/.libs -lnetcdf
57 - wLDFLAGS+=-L${n4}/libsrc4/.libs -lnetcdf -L${h5}/hl/src/.libs -lhdf5_hl -L${h5}/src/.libs -lhdf5
58 - wCPPFLAGS+=-I${n4}/libsrc4
59 + wLDFLAGS+=`nc-config --libs`
60 + wCPPFLAGS+=`nc-config --cflags`
61 a:=$(shell echo "\#define USE_NETCDF4" >> ${CONFIG_H})
63 a:=$(shell echo "//\#define USE_NETCDF4" >> ${CONFIG_H})
68 -p=${cwd}/libpng-1.2.44
69 -plib=$p/.libs/libpng.a
70 -wLDFLAGS+=-L$p/.libs -lpng
72 +plib=/usr/lib/libpng.a
73 +wLDFLAGS+=-L/usr/lib -lpng
74 +wCPPFLAGS+=-I/usr/include
83 +wLDFLAGS+=-L/usr/lib -lz
84 +wCPPFLAGS+=-I/usr/include
87 wCPPFLAGS+=-I/usr/include ${CPPFLAGS}
89 cd $w && export LDFLAGS="${wLDFLAGS}" && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE}
93 - cp $j.tar.gz tmpj.tar.gz
94 - gunzip -n tmpj.tar.gz
97 - cd $j && ./configure --without-x --disable-libjpeg --disable-opengl && ${MAKE}
100 - cp $p.tar.gz tmpp.tar.gz
101 - gunzip -n tmpp.tar.gz
105 -# export LDFLAGS="-L$z" && cd $p && export CPPFLAGS="${wCPPFLAGS}" && make -f scripts/makefile.darwin
106 -# for everybody else
107 - export LDFLAGS="-L$z" && cd $p && export CPPFLAGS="${wCPPFLAGS}" && ./configure --disable-shared && ${MAKE}
110 - cp $z.tar.gz tmpz.tar.gz
111 - gunzip -n tmpz.tar.gz
114 - cd $z && ./configure && ${MAKE}
117 -${glib}: ${jlib} ${plib} ${zlib}
120 - cd $g && export CPPFLAGS="${wCPPFLAGS}" && ${MAKE}
124 - cp netcdf.tar.gz tmpn.tar.gz
125 - gunzip -n tmpn.tar.gz
128 - cd $n && ./configure --enable-c-only && ${MAKE} check
130 -${n4lib}: ${zlib} ${h5lib}
131 - mkdir -p ${cwd}/zlib/include
132 - mkdir -p ${cwd}/zlib/lib
133 - cp ${z}/*.h ${cwd}/zlib/include/
134 - cp ${z}/*.a ${cwd}/zlib/lib/
136 - mkdir -p ${cwd}/hdf5/include
137 - cp ${h5}/src/*.h ${h5}/hl/src/*.h ${cwd}/hdf5/include
138 - mkdir -p ${cwd}/hdf5/lib
139 - cp ${h5}/src/.libs/*a ${h5}/hl/src/.libs/*a ${cwd}/hdf5/lib/
141 - cp ${n4}.tar.gz tmpn.tar.gz
142 - gunzip -n tmpn.tar.gz
145 - cd ${n4} && ./configure --disable-fortran --disable-cxx --disable-dap --enable-netcdf-4 --with-zlib=${cwd}/zlib --with-hdf5=${cwd}/hdf5 && ${MAKE}
147 -# cd ${n4} && ./configure --enable-c-only && ${MAKE} check
149 -# cd ${n4} && ./configure --enable-netcdf-4 --enable-c-only --with-zlib=${cwd}/zlib --with-hdf5=${cwd}/hdf5 && ${MAKE} check
151 -# cd ${n4} && ./configure --enable-c-only && ${MAKE} check
153 -# cd ${n4} && ./configure --enable-netcdf-4 --enable-c-only && ${MAKE} check
157 - cp ${h5}.tar.gz tmph5.tar.gz
158 - gunzip -n tmph5.tar.gz
161 - cd ${h5} && ./configure --disable-shared --disable-fortran --with-zlib=$z && ${MAKE} && ${MAKE}
162 -# cd ${h5} && ./configure --disable-shared --disable-fortran --with-zlib=$z && ${MAKE} && ${MAKE} check
165 cd ${ip} && export F90=${F90} && make