root/branches/branch-5-0/mapserver/Makefile.in

Revision 6676, 13.1 kB (checked in by dmorissette, 11 months ago)

configure --with-agg=DIR now automatically tries to build
agg_font_freetype.o from source if libaggfontfreetype is missing (#2215)

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # Run ./configure in the main MapServer directory to turn this Makefile.in
2 # into a proper Makefile
3
4 prefix          =       @prefix@
5 exec_prefix     =       @exec_prefix@
6 INST_PREFIX     =       @exec_prefix@
7 INST_LIB        =       @libdir@
8 INST_BIN        =       @bindir@
9
10 #
11 # MS_VERSION - Set by configure based in mapserver.h
12 #
13 MS_VERSION=     @MS_VERSION@
14
15 #
16 # Name of static and shared libs to produce
17 #
18 LIBMAP_STATIC=  libmapserver.a
19 LIBMAP_SHARED=  libmapserver.@SO_EXT@
20 LIBMAP_SH_VER=  libmapserver.$(MS_VERSION).@SO_EXT@
21
22 #
23 # If you want to ignore missing datafile errors uncomment the following
24 # line. This is especially useful with large tiled datasets that may not
25 # have complete data for each tile.
26 #
27 #IGNORE_MISSING_DATA=-DIGNORE_MISSING_DATA
28 IGNORE_MISSING_DATA = @IGNORE_MISSING_DATA@
29
30 #
31 # If you want to use shape Z and M parameter this option must be set.
32 # It's OFF by default.
33 #
34 #USE_POINT_Z_M=-DUSE_POINT_Z_M
35 USE_POINT_Z_M = @USE_POINT_Z_M@
36
37 #
38 # If you want to use disable fast versions of NINT (used by default) then
39 # define the following
40 # It's OFF by default.
41 #
42 #USE_NINT=-DUSE_GENERIC_MS_NINT
43 USE_NINT = @USE_NINT@
44
45 #
46 # Apparently these aren't as commonplace as I'd hoped. Edit the
47 # following line to reflect the missing functions on your platform.
48 #
49 # STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP -DNEED_STRLCAT
50 STRINGS= @STRINGS@
51
52 # Proj.4 distribution (cartographic projection routines). Not required for normal use.
53 PROJ_INC=  @PROJ_INC@
54 PROJ_LIBS= @PROJ_LIBS@
55 PROJ=      @PROJ_ENABLED@
56
57 # GD distribution (graphics library GIF and/or PNG support). (REQUIRED)
58 #
59 #   - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_1_3).
60 #   - Versions 1.6 and greater write PNG (-DUSE_GD_1_6). Add -lpng -lz to GD_LIB line.
61 #
62 #
63 GDFONT_OBJ=gd-1.2/gdfontt.o gd-1.2/gdfonts.o gd-1.2/gdfontmb.o gd-1.2/gdfontl.o gd-1.2/gdfontg.o
64 GD_INC=  @GD_INC@
65 GD_LIB=  @GD_LIB@
66 GD=      @GD_DEF@
67 GD_STATIC = @GD_STATIC@
68
69 #
70 # Optional Anti-Grain Geometry Support.
71 #
72 AGG=     @AGG_ENABLED@
73 AGG_LIB=  @AGG_LIB@
74 AGG_INC=  @AGG_INC@
75
76 #
77 # agg_font_freetype stuff.
78 #
79 # If libaggfreetype.so is not available on this system then set the following
80 # to enable building agg_font_freetype.o from source and linking it in directly
81 #
82 AGG_FT_DIR=@AGG_FT_DIR@
83 AGG_FT_OBJ=@AGG_FT_OBJ@
84
85 #
86 # ZLIB option (compressed SVG)
87 #
88 ZLIB_INC=  @ZLIB_INC@
89 ZLIB_LIB=  @ZLIB_LIB@
90 ZLIB=      @ZLIB_ENABLED@
91
92 #
93 # PDFlib distribution (PDF library w/ PDF support). (EXPERIMENTAL)
94 #
95 PDF_INC=  @PDF_INC@
96 PDF_LIB=  @PDF_LIB@
97 PDF=      @PDF_ENABLED@
98
99 # TIFF distribution (raster support for TIFF and GEOTIFF imagery). (RECOMMENDED)
100 TIFF_INC= @TIFF_INC@
101 TIFF_LIB= @TIFF_LIB@
102 TIFF=     @TIFF_ENABLED@
103
104 # JPEG distribution (raster support for grayscale JPEG images, INPUT ONLY).
105 JPEG_INC= @JPEG_INC@
106 JPEG_LIB= @JPEG_LIB@
107 JPEG=     @JPEG_ENABLED@
108
109 # EPPL7 Support (this activates ERDAS as well) Included in the distribution. Probably the best raster alternative if
110 # you've got EPPL7 laying around. See http://www.lmic.state.mn.us/ for more information. (RECOMMENDED)
111 EPPL=     @EPPL_ENABLED@
112 EPPL_OBJ= @EPPL_OBJ@
113
114 # ESRI SDE Support. You MUST have the SDE Client libraries and include files
115 # on your system someplace. The actual SDE server you wish to connect to can
116 # be elsewhere.
117 SDE=      @SDE_ENABLED@
118 SDE_LIB=  @SDE_LIB@
119 SDE_INC=  @SDE_INC@
120
121 # Optional OGR Support.  OGC Simple Feature inspired interface for vector
122 # formats.  See http://ogr.maptools.org/
123 # Note that since OGR is part of the GDAL library, it uses GDAL_LIB + GDAL_INC
124 OGR=      @OGR_ENABLED@
125
126 # Optional GDAL Support (provides read access to a variety of raster formats)
127 # See http://www.remotesensing.org/gdal/
128 GDAL=     @GDAL_ENABLED@
129 GDAL_LIB=  @GDAL_LIB@
130 GDAL_INC=  @GDAL_INC@
131
132 # Optional GEOS Support.
133 # See http://geos.refractions.net/
134 GEOS=     @GEOS_ENABLED@
135 GEOS_LIB=  @GEOS_LIB@
136 GEOS_INC=  @GEOS_INC@
137
138 # Optional PostGIS Support.  See http://postgis.refractions.net/
139 POSTGIS=      @POSTGIS_ENABLED@
140 POSTGIS_LIB=  @POSTGIS_LIB@
141 POSTGIS_INC=  @POSTGIS_INC@
142
143 # Optional MyGIS Support.  See http://postgis.refractions.net/
144 MYGIS=      @MYGIS_ENABLED@
145 MYGIS_LIB=  @MYGIS_LIB@
146 MYGIS_INC=  @MYGIS_INC@
147
148 # Optional ORACLESPATIAL Support. Contact: cabral@cttmar.univali.br
149 ORACLESPATIAL=@ORACLESPATIAL_ENABLED@
150 ORACLESPATIAL_LIB=@ORACLESPATIAL_LIB@
151 ORACLESPATIAL_INC=@ORACLESPATIAL_INC@
152
153 # Optional MING/SWF/FLASH Support. Contact: assefa@dmsolutions.ca
154 MING=@MING_ENABLED@
155 MING_LIB=@MING_LIB@
156 MING_INC=@MING_INC@
157
158 # libcurl ... required for WMS/WFS Client Connections
159 CURL_INC=@CURL_INC@
160 CURL_LIB=@CURL_LIB@
161
162 # libxml2 ... required for OGC SOS Server
163 XML2_INC=@XML2_INC@
164 XML2_LIB=@XML2_LIB@
165
166 # Optional FastCGI
167 FASTCGI=@FASTCGI_ENABLED@
168 FASTCGI_INC=@FASTCGI_INC@
169 FASTCGI_LIB=@FASTCGI_LIB@
170
171 # OWS: OGC Web Services support
172 # OGC WMS Server:  -DUSE_WMS_SVR (Requires PROJ4 support)
173 # OGC WMS Client Connections:  -DUSE_WMS_LYR (Requires PROJ4 and libcurl)
174 # OGC WFS Server: -DUSE_WFS_SVR (Requires OGR, PROJ4 recommended)
175 # OGC WFS Client: -DUSE_WFS_LYR (Requires OGR, PROJ4 and libcurl)
176 # OGC WCS Server: -DUSE_WCS_SVR (Requires GDAL and PROJ4)
177 # OGC SOS Server: -DUSE_SOS_SVR (Requires PROJ4 and libxml2)
178 OWS=@WMS_SVR_ENABLED@ @WMS_LYR_ENABLED@ @WFS_SVR_ENABLED@ @WFS_LYR_ENABLED@ @WCS_SVR_ENABLED@ @SOS_SVR_ENABLED@
179
180 #
181 # IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
182 #
183 # In order to compile the PHP_MAPSCRIPT module, we have to make MapServer
184 # use the same version of the REGEX library that PHP was compiled with:
185 #
186 PHP_REGEX_OBJ=@PHP_REGEX_OBJ@
187 PHP_REGEX_INC=@PHP_REGEX_INC@
188
189 #
190 # Multithreading support.
191 #
192 THREAD=@THREAD_FLAG@
193 THREAD_LIB=@THREAD_LIB@
194
195 #
196 # libiconv - Enables Internationalization
197 #
198 ICONV=@ICONV_ENABLED@
199 ICONV_LIB=@ICONV_LIB@
200 ICONV_INC=@ICONV_INC@
201
202 #
203 # Pick a compiler, etc. Flex and bison are only required if you need to modify the mapserver lexer (maplexer.l) or expression parser (mapparser.y).
204 #
205 CXX=    @CXX@
206 CC=     @CC@
207 LD=     @CXX@
208 AR= ar rc
209 RANLIB= @RANLIB@
210 LEX=    @LEX@
211 YACC=   @YACC@
212
213
214 # figure out how to build a shared library. 
215 # most of the relevant stuff is in AC_LD_SHARED in
216 # aclocal.m4
217
218 LD_SHARED = @LD_SHARED@
219 LD_SONAME_LIBMAP = -W1,@SO_COMMAND_NAME@,$(LIBMAP_SH_VER)
220
221 XTRALIBS= @XTRALIBS@
222 RUNPATHS= @RPATHS@
223
224 DEFINES = $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) $(EPPL) $(PROJ) \
225         $(OWS) $(MING) $(ORACLESPATIAL) $(TIFF) $(JPEG) $(GD) $(AGG) $(PDF) $(SDE) \
226         $(SDERASTER) $(OGR) $(GDAL) $(GEOS) $(ICONV) $(FASTCGI) $(PHP_REGEX) \
227         $(POSTGIS) $(MYGIS) $(THREAD) $(ZLIB)
228
229 INCLUDES = $(REGEX_INC) $(GD_INC) $(AGG_INC) $(PDF_INC) $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC) \
230         $(SDE_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYGIS_INC) \
231         $(CURL_INC) $(MING_INC) $(ORACLESPATIAL_INC) $(GEOS_INC) $(ICONV_INC) \
232         $(FASTCGI_INC) $(ZLIB_INC) $(XML2_INC)
233
234 FLAGS = @DEBUG_FLAGS@ $(DEFINES) $(INCLUDES)
235
236 CFLAGS   = @CFLAGS@ $(FLAGS)
237 CXXFLAGS = @CXXFLAGS@ $(FLAGS)
238
239 # Link flags and shared libs only
240 SUP_LIBS =  $(GD_LIB) $(AGG_LIB) $(PDF_LIB) $(TIFF_LIB) $(PROJ_LIBS) \
241           $(JPEG_LIB) $(SDE_LIB) $(GDAL_LIB) $(MING_LIB) $(POSTGIS_LIB) \
242           $(MYGIS_LIB) $(CURL_LIB) $(ORACLESPATIAL_LIB) $(GEOS_LIB) \
243           $(THREAD_LIB) $(ICONV_LIB) $(FASTCGI_LIB) \
244           $(ZLIB_LIB) $(XML2_LIB) $(XTRALIBS)
245
246 # STATIC_LIBS is full filename with path of libs that will be statically linked
247 STATIC_LIBS= $(GD_STATIC)
248
249 EXE_LDFLAGS =   $(RUNPATHS) -L. -lmapserver $(SUP_LIBS) $(STATIC_LIBS)
250
251 RM= /bin/rm -f
252
253 OBJS= maptemplate.o mapbits.o maphash.o mapshape.o mapxbase.o mapparser.o maplexer.o maptree.o mapsearch.o mapstring.o mapsymbol.o mapfile.o maplegend.o maputil.o mapscale.o mapquery.o maplabel.o maperror.o mapprimitive.o mapproject.o mapraster.o mapsde.o mapogr.o mappostgis.o mapmygis.o maplayer.o mapresample.o mapwms.o mapwmslayer.o maporaclespatial.o mapgml.o mapprojhack.o mapthread.o mapdraw.o mapgd.o mapagg.o mapoutput.o mapgdal.o mapswf.o mapimagemap.o mapows.o mapwfs.o mapwfslayer.o mapcontext.o maphttp.o mapdrawgdal.o mappdf.o mapjoin.o mapgraticule.o mapcopy.o mapogcfilter.o mapogcsld.o maptime.o mapwcs.o mapcpl.o cgiutil.o maprasterquery.o mapobject.o mapgeos.o classobject.o layerobject.o mapio.o mappool.o mapsvg.o mapregex.o mappluginlayer.o mapogcsos.o mappostgresql.o mapcrypto.o mapowscommon.o mapdebug.o mapchart.o maptclutf.o $(EPPL_OBJ) $(AGG_FT_OBJ)
254
255 EXE_LIST =      shp2img shp2pdf legend mapserv shptree shptreevis \
256                 shptreetst scalebar sortshp mapscriptvars tile4ms \
257                 msencrypt mapserver-config
258
259 #
260 # --- You shouldn't have to edit anything else. ---
261 #
262 all: $(MAKE_GD) libmapserver.a $(EXTRA_DEFAULT) $(EXE_LIST) @MAKE_PHPMS@
263
264 #
265 # Non-gnumake's don't seem to use this pattern rule,
266 # but have a similar built-in rule for C code.  So try not
267 # to change these, since the change is unlikely to stick.
268 #
269 .c.o:
270         $(CC) -c $(CFLAGS) $< -o $@
271
272 mapogr.o:       mapogr.cpp
273         $(CXX) -c $(CXXFLAGS) mapogr.cpp -o mapogr.o
274
275 agg_font_freetype.o: $(AGG_FT_DIR)/agg_font_freetype.cpp
276         $(CXX) -c $(CXXFLAGS) $(AGG_FT_DIR)/agg_font_freetype.cpp -o agg_font_freetype.o
277
278 php3_mapscript:: $(LIBMAP_STATIC)
279         cd mapscript/php3; $(MAKE); cd ../..
280
281 maplexer.o: maplexer.c mapserver.h mapfile.h
282
283 maplexer.c: maplexer.l
284         $(LEX) --nounistd -Pmsyy -i -omaplexer.c maplexer.l
285
286 mapparser.o: mapparser.c mapserver.h
287
288 mapparser.c: mapparser.y
289         $(YACC) -p msyy -d -omapparser.c mapparser.y
290
291 lib:    $(LIBMAP_STATIC)
292 libmapserver: $(LIBMAP_STATIC)
293 libmapserver.a: mapserver.h $(OBJS)
294         $(AR) $(LIBMAP_STATIC) $(OBJS)
295         $(RANLIB) $(LIBMAP_STATIC)
296         # We don't want to let the shared library get out of sync with the
297         # static library if it exists.
298         if test -r $(LIBMAP_SHARED) ; then \
299           make shared ; \
300         fi
301
302 shared: $(LIBMAP_SHARED)
303 $(LIBMAP_SHARED):       $(LIBMAP_STATIC)
304         $(LD_SHARED) $(LD_SONAME_LIBMAP) -o $(LIBMAP_SH_VER) \
305                 $(RUNPATHS) $(OBJS) $(SUP_LIBS) $(STATIC_LIBS) \
306         && ln -f -s $(LIBMAP_SH_VER) $(LIBMAP_SHARED)
307
308 shp2pdf: $(LIBMAP_STATIC) shp2pdf.o mapserver.h
309         $(LD) $(CFLAGS) shp2pdf.o $(EXE_LDFLAGS) -o shp2pdf
310
311 shp2img: $(LIBMAP_STATIC)  shp2img.o mapserver.h
312         $(LD) $(CFLAGS) shp2img.o $(EXE_LDFLAGS) -o shp2img
313
314 sym2img: $(LIBMAP_STATIC)   sym2img.o mapserver.h
315         $(LD) $(CFLAGS) sym2img.o $(EXE_LDFLAGS) -o sym2img
316
317 legend: $(LIBMAP_STATIC)  legend.o mapserver.h
318         $(LD) $(CFLAGS) legend.o $(EXE_LDFLAGS) -o legend
319
320 scalebar: $(LIBMAP_STATIC)  scalebar.o mapserver.h
321         $(LD) $(CFLAGS) scalebar.o $(EXE_LDFLAGS) -o scalebar
322
323 mapserv: mapserv.h $(LIBMAP_STATIC)  mapserv.o cgiutil.o mapserver.h
324         $(LD) $(CFLAGS) mapserv.o cgiutil.o $(EXE_LDFLAGS) -o mapserv
325
326 shpindex: $(LIBMAP_STATIC) shpindex.o mapserver.h
327         $(LD) $(CFLAGS) shpindex.o $(EXE_LDFLAGS) -o shpindex
328
329 shptree: $(LIBMAP_STATIC) shptree.o mapserver.h
330         $(LD) $(CFLAGS) shptree.o $(EXE_LDFLAGS) -o shptree
331
332 shptreevis: $(LIBMAP_STATIC) shptreevis.o mapserver.h
333         $(LD) $(CFLAGS) shptreevis.o $(EXE_LDFLAGS) -o shptreevis
334
335 shptreetst: $(LIBMAP_STATIC) shptreetst.o mapserver.h
336         $(LD) $(CFLAGS) shptreetst.o $(EXE_LDFLAGS) -o shptreetst
337
338 sortshp: sortshp.o
339         $(LD) $(CFLAGS) sortshp.o $(EXE_LDFLAGS) -o sortshp
340
341 tile4ms: tile4ms.o
342         $(LD) $(CFLAGS) tile4ms.o $(EXE_LDFLAGS) -o tile4ms
343
344 msencrypt: $(LIBMAP_STATIC) msencrypt.o mapserver.h
345         $(LD) $(CFLAGS) msencrypt.o $(EXE_LDFLAGS) -o msencrypt
346
347 testexpr: testexpr.o mapparser.o maplexer.o
348         $(LD) $(CFLAGS) testexpr.o $(EXE_LDFLAGS) -o testexpr
349
350 testcopy: $(LIBMAP_STATIC) testcopy.o mapcopy.o mapserver.h
351         $(LD) $(CFLAGS) testcopy.o $(EXE_LDFLAGS) -o testcopy
352
353 test_mapcrypto: $(LIBMAP_STATIC) mapcrypto.c
354         $(CC) $(CFLAGS) mapcrypto.c -DTEST_MAPCRYPTO $(EXE_LDFLAGS) -o test_mapcrypto
355
356 mapscriptvars:  Makefile
357         touch mapscriptvars
358         pwd > mapscriptvars
359         echo $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) $(EPPL) $(PROJ) $(TTF) $(TIFF) $(JPEG) $(GD) $(SDE) $(OGR) $(GDAL) $(GEOS) $(OWS) $(AGG) >> mapscriptvars
360         echo -I. $(PROJ_INC) $(GD_INC) $(TTF_INC) $(TIFF_INC) $(JPEG_INC) $(SDE_INC) $(OGR_INC) $(GDAL_INC) $(GEOS_INC) >> mapscriptvars
361         echo $(EXE_LDFLAGS) >> mapscriptvars
362         echo $(STATIC_LIBS) >> mapscriptvars
363         grep '#define MS_VERSION' mapserver.h >> mapscriptvars
364
365 mapserver-config: Makefile
366         rm -f mapserver-config
367         echo '#!/bin/sh' > mapserver-config
368         echo 'CONFIG_LIBS="$(SUP_LIBS)"' >> mapserver-config
369         echo 'CONFIG_DEP_LIBS="$(LIBS)"' >> mapserver-config
370         echo 'CONFIG_CFLAGS="$(CFLAGS)"' >> mapserver-config
371         echo 'CONFIG_DEFINES="$(DEFINES)"' >> mapserver-config
372         echo 'CONFIG_INCLUDES="$(INCLUDES)"' >> mapserver-config
373         echo 'CONFIG_VERSION="'`grep '#define MS_VERSION' mapserver.h | sed 's/\"//g' | sed 's/#define MS_VERSION //'`'"' >> mapserver-config
374         cat mapserver-config.in >> mapserver-config
375         chmod a+x mapserver-config
376
377 php3_mapscript_clean::
378         cd mapscript/php3; $(MAKE) clean; cd ../..
379
380 install:
381         @echo ""
382         @echo "***** MapServer Installation *****"
383         @echo "To install MapServer, copy the 'mapserv' file to your web server's cgi-bin "
384         @echo "directory."
385         @echo "If you use MapScript then see the documentation for your specific MapScript"
386         @echo "version for installation instructions."
387         @echo ""
388
389 install-force:  all
390         cp $(EXE_LIST) $(INST_BIN)
391         if test -x $(LIBMAP_SHARED) ; then \
392           cp $(LIBMAP_SH_VER) $(INST_LIB) ; \
393           (cd $(INST_LIB) ; ln -f -s $(LIBMAP_SH_VER) $(LIBMAP_SHARED) ) ; \
394         fi
395
396 uninstall:
397         (cd $(INST_BIN) && rm $(EXE_LIST) )
398         (cd $(INST_LIB) && rm $(LIBMAP_SH_VER) $(LIBMAP_SHARED) )
399
400 clean: @MAKE_PHPMS_CLEAN@
401         rm -f $(LIBMAP_STATIC) $(LIBMAP_SHARED) $(LIBMAP_SH_VER) *.o $(EXE_LIST)
402
403 exe-clean:
404         rm -f $(EXE_LIST)
405
406 distclean:
407         $(MAKE) clean
408         rm config.*
409         if test -d autom4te.cache ; then \
410           rm -f -r autom4te.cache ; \
411         fi
412
413 sorta-clean:
414         rm -f *.o
Note: See TracBrowser for help on using the browser.