# CC = gcc-3.0 # CXX = g++-3.0 # CFLAGS = -g -Wall CFLAGS = -g -O6 -Wall -DNDEBUG ALL = goo-ripper \ idx-index idx-client \ io-test geo-client \ geo-tiger-to-1 geo-fips-to-2 geo-1-to-2 \ geo-2-to-2a geo-2-to-3 geo-3-to-map all: $(ALL) clean: $(RM) *.step* *.map *.hex *.rip *.index *.o $(ALL) tar: $(RM) geo-search ln -s . geo-search tar cvfz geo-search.tar.gz geo-search/Makefile geo-search/*.h geo-search/*.c geo-search/*.cc geo-search/*.sh geo-search/*.cgi geo-search/alias.txt geo-search/NOTES geo-search/LICENSE geo-search/README ############################################################################### # geocoder: geo-*, io-* IO = io-mmap.o io-common.o # IO = io-stdio.o io-common.o io-test: io-test.o io-mmap.o io-common.o geo-tiger-to-1: geo-tiger-to-1.o geo-fips-to-2: geo-fips-to-2.o geo-1-to-2: geo-1-to-2.o $(IO) geo-2-to-2a: geo-2-to-2a.o $(IO) geo-2-to-3: geo-2-to-3.o $(IO) geo-3-to-map: geo-3-to-map.o $(IO) geo-client: geo-client.o geo-find.o $(IO) .PRECIOUS: %.step1 %.step2 %.step2a %.step3 %.map %.rip %.tiger: %.zip unzip -p $*.zip 'TGR*.RT6' > $@ unzip -p $*.zip 'TGR*.RT5' >> $@ unzip -p $*.zip 'TGR*.RT4' >> $@ unzip -p $*.zip 'TGR*.RT1' >> $@ %.step1: geo-tiger-to-1 %.tiger ./geo-tiger-to-1 < $*.tiger | sort -f > $@ %.step2: geo-1-to-2 %.step1 geo-fips-to-2 %.fips $(RM) $*.map ( ./geo-1-to-2 $*.map < $*.step1 ; ./geo-fips-to-2 < $*.fips ) > $@ %.step2a: geo-2-to-2a %.step2 %.alias ./geo-2-to-2a $*.alias < $*.step2 | sort -f > $@ %.step3: geo-2-to-3 %.step2a ./geo-2-to-3 $*.map < $*.step2a > $@ %.map: geo-3-to-map %.step3 ./geo-3-to-map $@ < $*.step3 %.hex: % od -t xC $* > $@ ############################################################################### # ripper: goo-* CXXFLAGS = $(CFLAGS) goo-ripper: \ goo-varint.o goo-netutil.o goo-parseelt.o goo-repos-reader.o \ goo-parsehandler-preparsecat.o \ goo-parsehandler-caturl.o \ goo-parsehandler-geocode.o geo-find.o geodesy.o $(IO) ############################################################################### # indexer: idx-index idx-index: $(IO) idx-client: idx-find.o geo-find.o geodesy.o $(IO) %.rip: %.bz2 goo-ripper bzip2 -dc $*.bz2 | ./goo-ripper --geocode all.map 0 - | sort -uf > $@ %.index: %.rip idx-index $(RM) $@ ./idx-index $@ < $*.rip ./idx-index $@ < $*.rip