1# Makefile for the Arc/Info Vector Coverage (AVC) reader 2# 3# $Id: GNUmakefile,v 1.8 2006/06/27 18:38:43 dmorissette Exp $ 4# 5# $Log: GNUmakefile,v $ 6# Revision 1.8 2006/06/27 18:38:43 dmorissette 7# Cleaned up E00 reading (bug 1497, patch from James F.) 8# 9# Revision 1.7 2001/11/25 21:15:22 daniel 10# Added hack (AVC_MAP_TYPE40_TO_DOUBLE) to map type 40 fields bigger than 8 11# digits to double precision as we generate E00 output (bug599) 12# 13# Revision 1.6 2000/09/26 20:48:40 daniel 14# Added optional -DAVC_IGNORE_RMDIR_ERROR 15# 16# Revision 1.5 2000/05/29 17:12:56 daniel 17# Added avc_mbyte.* 18# 19# Revision 1.4 1999/12/24 07:18:34 daniel 20# Added PC Arc/Info coverages support 21# 22# Revision 1.3 1999/05/11 02:06:54 daniel 23# Added coverage write support (alpha version) 24# 25# Revision 1.2 1999/02/25 05:19:06 daniel 26# Added cpl_dir.c 27# 28# Revision 1.1 1999/01/29 16:29:55 daniel 29# Initial revision 30# 31# 32 33# 34# Default compiler is cc, 35# 36CC = cc 37 38# 39# Link with DBMALLOC when running in a test environment 40# 41#LIB_DBMALLOC= /home/daniel/proj/dbmalloc-14L2/libdbmalloc.a 42 43# 44# Byte ordering ... default is Intel ordering (CPL_LSB), 45# Select CPL_MSB for SUNs or other platforms with MSB first ordering. 46# 47# BYTE_ORDER_FL = -DCPL_MSB 48BYTE_ORDER_FL = -DCPL_LSB 49 50# 51# In some cases, AVCE00DeleteCoverage() fails because the coverage directory 52# could be locked by another application on the same system or somewhere on 53# the network. 54# Uncomment the following line to define AVC_IGNORE_RMDIR_ERROR at compile 55# time if you want this error to be ignored. 56# 57# OPTFLAGS := $(OPTFLAGS) -DAVC_IGNORE_RMDIR_ERROR 58 59# 60# Due to the odd way that fields of type 40 are handled in E00, you will 61# start to lose some digits of precision with fields bigger than 8 digits when 62# exporting to E00. Define AVC_MAP_TYPE40_TO_DOUBLE to ask the AVC lib to 63# automatically remap fields of type 40 bigger than 8 digits to double 64# precision floats while writing E00. Double precision floats can carry up 65# to 18 digits of precision. 66# 67OPTFLAGS := $(OPTFLAGS) -DAVC_MAP_TYPE40_TO_DOUBLE 68 69 70# 71# 72# 73CFLAGS= $(BYTE_ORDER_FL) $(OPTFLAGS) -g -Wall -DDEBUG 74LFLAGS= 75AR= ar 76 77LIB_OBJS= avc_e00read.o avc_e00write.o avc_rawbin.o avc_bin.o avc_binwr.o \ 78 avc_e00gen.o avc_e00parse.o avc_misc.o \ 79 cpl_error.o cpl_conv.o cpl_vsisimple.o cpl_string.o cpl_dir.o \ 80 avc_mbyte.o dbfopen.o 81 82LIB= avc.a 83 84default: $(LIB) avcimport avcexport avcdelete avctest ex_avcwrite 85 86$(LIB_OBJS): avc.h avc_mbyte.h cpl_error.h cpl_port.h cpl_conv.h \ 87 cpl_vsi.h cpl_string.h 88 89avcimport: avcimport.o $(LIB) avc.h 90 $(CC) $(LFLAGS) -o avcimport avcimport.o $(LIB) 91 92avcexport: avcexport.o $(LIB) avc.h 93 $(CC) $(LFLAGS) -o avcexport avcexport.o $(LIB) 94 95avcdelete: avcdelete.o $(LIB) avc.h 96 $(CC) $(LFLAGS) -o avcdelete avcdelete.o $(LIB) 97 98avctest: avctest.o $(LIB) avc.h 99 $(CC) $(LFLAGS) -o avctest avctest.o $(LIB) 100 101ex_avcwrite: ex_avcwrite.o $(LIB) avc.h 102 $(CC) $(LFLAGS) -o ex_avcwrite ex_avcwrite.o $(LIB) $(LIB_DBMALLOC) 103 104testmulti: testmulti.o $(LIB) avc.h 105 $(CC) $(LFLAGS) -o testmulti testmulti.o $(LIB) $(LIB_DBMALLOC) 106 107%.o: %.c 108 $(CC) -c $(CFLAGS) $*.c -o $*.o 109 110%.o: %.cpp 111 $(CC) -c $(CFLAGS) $*.cpp -o $*.o 112 113$(LIB): $(LIB_OBJS) 114 rm -f $(LIB) 115 $(AR) rc $(LIB) $(LIB_OBJS) 116 117clean: 118 rm -f $(LIB) $(LIB_OBJS) 119 rm -f avctest.o avctest avcexport.o avcexport avcimport.o avcimport \ 120 ex_avcwrite ex_avcwrite.o avcdelete.o avcdelete 121 122