open-source-search-engine/Makefile

632 lines
19 KiB
Makefile
Raw Normal View History

2013-08-03 00:12:24 +04:00
SHELL = /bin/bash
CC=g++
OBJS = UdpSlot.o Rebalance.o \
2013-08-03 00:12:24 +04:00
Msg13.o Mime.o IndexReadInfo.o \
2014-02-10 03:41:43 +04:00
PageGet.o PageHosts.o PageIndexdb.o \
2014-06-15 19:26:27 +04:00
PageParser.o PageInject.o PagePerf.o PageReindex.o PageResults.o \
2014-02-09 23:38:40 +04:00
PageAddUrl.o PageRoot.o PageSockets.o PageStats.o \
2013-08-03 00:12:24 +04:00
PageTitledb.o \
2014-01-10 09:13:41 +04:00
PageAddColl.o \
2013-08-03 00:12:24 +04:00
hash.o Domains.o \
Collectiondb.o \
2013-08-03 00:12:24 +04:00
linkspam.o ip.o sort.o \
fctypes.o XmlNode.o XmlDoc.o Xml.o \
Words.o Url.o UdpServer.o \
Threads.o Titledb.o HashTable.o \
TcpServer.o Summary.o \
Spider.o \
Catdb.o \
RdbTree.o RdbScan.o RdbMerge.o RdbMap.o RdbMem.o RdbBuckets.o \
RdbList.o RdbDump.o RdbCache.o Rdb.o RdbBase.o \
Query.o Phrases.o Multicast.o Msg9b.o\
Msg8b.o Msg5.o \
Msg39.o Msg37.o Msg36.o Msg3.o \
Msg22.o \
Msg20.o Msg2.o \
Msg1.o Msg35.o \
Msg0.o Mem.o Matches.o Loop.o \
Log.o Lang.o \
Indexdb.o Posdb.o Clusterdb.o IndexList.o Revdb.o \
HttpServer.o HttpRequest.o \
HttpMime.o Hostdb.o \
Highlight.o File.o Errno.o Entities.o \
Dns.o Dir.o Conf.o Bits.o \
Stats.o BigFile.o Msg17.o \
2013-08-03 00:12:24 +04:00
Speller.o DiskPageCache.o \
PingServer.o StopWords.o TopTree.o \
Parms.o Pages.o \
2013-08-03 00:12:24 +04:00
Unicode.o iana_charset.o Iso8859.o \
SearchInput.o \
2013-10-03 08:34:21 +04:00
Categories.o Msg2a.o PageCatdb.o PageDirectory.o \
2013-08-03 00:12:24 +04:00
SafeBuf.o Datedb.o \
UCNormalizer.o UCPropTable.o UnicodeProperties.o \
Pops.o Title.o Pos.o LangList.o \
Profiler.o \
AutoBan.o Msg3a.o HashTableT.o HashTableX.o \
PageLogView.o Msg1f.o Blaster.o MsgC.o \
PageSpam.o Proxy.o PageThreads.o Linkdb.o \
matches2.o LanguageIdentifier.o \
Language.o Repair.o Process.o \
2013-08-03 00:12:24 +04:00
Abbreviations.o \
RequestTable.o TuringTest.o Msg51.o geo_ip_table.o \
2014-05-31 02:05:00 +04:00
Msg40.o Msg4.o SpiderProxy.o \
2013-08-03 00:12:24 +04:00
LanguagePages.o \
Statsdb.o PageStatsdb.o \
PostQueryRerank.o Msge0.o Msge1.o \
CountryCode.o DailyMerge.o CatRec.o Tagdb.o \
Users.o Images.o Wiki.o Wiktionary.o Scraper.o \
2014-04-05 22:33:42 +04:00
Dates.o Sections.o SiteGetter.o Syncdb.o qa.o \
2013-08-03 00:12:24 +04:00
Placedb.o Address.o Test.o GeoIP.o GeoIPCity.o Synonyms.o \
2014-02-09 02:10:06 +04:00
Cachedb.o Monitordb.o dlstubs.o PageCrawlBot.o Json.o PageBasic.o
2013-08-03 00:12:24 +04:00
CHECKFORMATSTRING = -D_CHECK_FORMAT_STRING_
DEFS = -D_REENTRANT_ $(CHECKFORMATSTRING) -I.
HOST=$(shell hostname)
#print_vars:
# $(HOST)
ifeq ("titan","$(HOST)")
# my machine, titan, runs the old 2.4 kernel, it does not use pthreads because
# they were very buggy in 1999. Plus they are still kind of slow even today,
# in 2013. So it just uses clone() and does its own "threading". Unfortunately,
# the way it works is not even possible on newer kernels because they no longer
# allow you to override the _errno_location() function. -- matt
2014-02-10 03:41:43 +04:00
# -DMATTWELLS
# turn off stack smash detection because it won't save and dump core when
# stack gets smashed like it normally would when it gets a seg fault signal.
2014-02-12 07:50:36 +04:00
CPPFLAGS = -m32 -g -Wall -pipe -Wno-write-strings -Wstrict-aliasing=0 -Wno-uninitialized -static -DTITAN
2013-08-03 00:12:24 +04:00
LIBS = ./libz.a ./libssl.a ./libcrypto.a ./libiconv.a ./libm.a
else
# use -m32 to force 32-bit mode compilation.
# you might have to do apt-get install gcc-multilib to ensure that -m32 works.
# -m32 should use /usr/lib32/ as the library path.
# i also provide 32-bit libraries for linking that are not so easy to get.
#
2013-11-18 09:25:19 +04:00
# mdw. 11/17/2013. i took out the -D_PTHREADS_ flag (and -lpthread).
# trying to use good ole' clone() again because it seems the errno location
# thing is fixed by just ignoring it.
#
CPPFLAGS = -m32 -g -Wall -pipe -fno-stack-protector -Wno-write-strings -Wstrict-aliasing=0 -Wno-uninitialized -static -DPTHREADS -Wno-unused-but-set-variable
2013-11-19 09:32:00 +04:00
LIBS= -L. ./libz.a ./libssl.a ./libcrypto.a ./libiconv.a ./libm.a ./libstdc++.a -lpthread
2014-06-08 03:30:56 +04:00
# use this for compiling on CYGWIN: (only for 32bit cygwin right now and
# you have to install the packages that have these libs.
#LIBS= -lz -lm -lpthread -lssl -lcrypto -iconv -lz
2013-08-03 00:12:24 +04:00
endif
# if you have seo.cpp link that in. This is not part of the open source
# distribution but is available for interested parties.
ifneq ($(wildcard seo.cpp),)
OBJS:=$(OBJS) seo.o
endif
2013-08-03 00:12:24 +04:00
# let's keep the libraries in the repo for easier bug reporting and debugging
# in general if we can. the includes are still in /usr/include/ however...
# which is kinda strange but seems to work so far.
#LIBS= -L. ./libz.a ./libssl.a ./libcrypto.a ./libiconv.a ./libm.a ./libgcc.a ./libpthread.a ./libc.a ./libstdc++.a
2013-08-03 00:12:24 +04:00
#SRCS := $(OBJS:.o=.cpp) main.cpp
all: gb
g8: gb
scp gb g8:/p/gb.new
ssh g8 'cd /p/ ; ./gb stop ; ./gb installgb ; sleep 4 ; ./gb start'
2014-06-08 01:58:57 +04:00
utils: addtest blaster2 dump hashtest makeclusterdb makespiderdb membustest monitor seektest urlinfo treetest dnstest dmozparse gbtitletest
2013-08-03 00:12:24 +04:00
gb: $(OBJS) main.o $(LIBFILES)
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ main.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
2014-06-10 05:48:58 +04:00
cygwin:
make DEFS="-DCYGWIN -D_REENTRANT_ $(CHECKFORMATSTRING) -I." gb
2013-08-03 00:12:24 +04:00
2014-04-11 08:59:50 +04:00
#iana_charset.cpp: parse_iana_charsets.pl character-sets supported_charsets.txt
# ./parse_iana_charsets.pl < character-sets
2013-08-03 00:12:24 +04:00
2014-04-11 08:59:50 +04:00
#iana_charset.h: parse_iana_charsets.pl character-sets supported_charsets.txt
# ./parse_iana_charsets.pl < character-sets
2013-08-03 00:12:24 +04:00
run_parser: test_parser
./test_parser ~/turkish.html
test_parser: $(OBJS) test_parser.o Makefile
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ test_parser.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
test_parser2: $(OBJS) test_parser2.o Makefile
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ test_parser2.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
test_hash: test_hash.o $(OBJS)
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ test_hash.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
test_norm: $(OBJS) test_norm.o
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ test_norm.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
test_convert: $(OBJS) test_convert.o
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ test_convert.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
supported_charsets: $(OBJS) supported_charsets.o supported_charsets.txt
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ supported_charsets.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
gbchksum: gbchksum.o
g++ -g -Wall -o $@ gbchksum.o
create_ucd_tables: $(OBJS) create_ucd_tables.o
2014-06-10 05:48:58 +04:00
g++ $(DEFS) $(CPPFLAGS) -o $@ create_ucd_tables.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
ucd.o: ucd.cpp ucd.h
ucd.cpp: parse_ucd.pl
./parse_ucd.pl UNIDATA/UnicodeData.txt ucd
ipconfig: ipconfig.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o -lc
2014-06-08 01:58:57 +04:00
blaster2: $(OBJS) blaster2.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
udptest: $(OBJS) udptest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
dnstest: $(OBJS) dnstest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
thunder: thunder.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -static -o $@ $@.o
2013-08-03 00:12:24 +04:00
threadtest: threadtest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o -lpthread
2013-08-03 00:12:24 +04:00
memtest: memtest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o
2013-08-03 00:12:24 +04:00
hashtest: hashtest.cpp
$(CC) -O3 -o hashtest hashtest.cpp
hashtest0: hashtest
scp hashtest gb0:/a/
membustest: membustest.cpp
$(CC) -O0 -o membustest membustest.cpp -static -lc
mergetest: $(OBJS) mergetest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
addtest: $(OBJS) addtest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
addtest0: $(OBJS) addtest
bzip2 -fk addtest
scp addtest.bz2 gb0:/a/
seektest: seektest.cpp
$(CC) -o seektest seektest.cpp -lpthread
treetest: $(OBJ) treetest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) -O2 $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
treetest0: treetest
bzip2 -fk treetest
scp treetest.bz2 gb0:/a/
ssh gb0 'cd /a/ ; rm treetest ; bunzip2 treetest.bz2'
nicetest: nicetest.o
$(CC) -o nicetest nicetest.cpp
monitor: $(OBJS) monitor.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ monitor.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
reindex: $(OBJS) reindex.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
convert: $(OBJS) convert.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
maketestindex: $(OBJS) maketestindex.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
makespiderdb: $(OBJS) makespiderdb.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
makespiderdb0: makespiderdb
bzip2 -fk makespiderdb
scp makespiderdb.bz2 gb0:/a/
makeclusterdb: $(OBJS) makeclusterdb.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
makeclusterdb0: makeclusterdb
bzip2 -fk makeclusterdb
scp makeclusterdb.bz2 gb0:/a/
ssh gb0 'cd /a/ ; rm makeclusterdb ; bunzip2 makeclusterdb.bz2'
makefix: $(OBJS) makefix.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
makefix0: makefix
bzip2 -fk makefix
scp makefix.bz2 gb0:/a/
urlinfo: $(OBJS) urlinfo.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $(OBJS) urlinfo.o $(LIBS)
2013-08-03 00:12:24 +04:00
dmozparse: $(OBJS) dmozparse.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
gbfilter: gbfilter.cpp
g++ -g -o gbfilter gbfilter.cpp -static -lc
gbtitletest: gbtitletest.o
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
2013-08-03 00:12:24 +04:00
# comment this out for faster deb package building
2013-08-03 00:12:24 +04:00
clean:
2014-06-08 01:58:57 +04:00
-rm -f *.o gb *.bz2 blaster2 udptest memtest hashtest membustest mergetest seektest addtest monitor reindex convert maketestindex makespiderdb makeclusterdb urlinfo gbfilter dnstest thunder dmozparse gbtitletest gmon.* GBVersion.cpp quarantine core core.*
2013-08-03 00:12:24 +04:00
.PHONY: GBVersion.cpp
convert.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
StopWords.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Places.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Loop.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
hash.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
fctypes.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
IndexList.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Matches.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Highlight.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
matches2.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
linkspam.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Matchers.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
HtmlParser.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# Url::set() seems to take too much time
Url.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# Sitedb has that slow matching code
Sitedb.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Catdb.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# when making a new file, add the recs to the map fast
RdbMap.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# this was getting corruption, was it cuz we used -O2 compiler option?
# RdbTree.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
RdbBuckets.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
Linkdb.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
2013-10-18 04:18:05 +04:00
XmlDoc.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
# final gigabit generation in here:
Msg40.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
seo.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
TopTree.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
UdpServer.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
RdbList.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Rdb.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# take this out. seems to not trigger merges when percent of
# negative titlerecs is over 40.
2013-08-03 00:12:24 +04:00
RdbBase.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# RdbCache.cpp gets "corrupted" with -O2... like RdbTree.cpp
#RdbCache.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# fast dictionary generation and spelling recommendations
#Speller.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# O2 seems slightly faster than O2 on this for some reason
# O2 is almost twice as fast as no O
IndexTable.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
IndexTable2.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Posdb.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# Query::setBitScores() needs this optimization
#Query.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# Msg3's should calculate the page ranges fast
#Msg3.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# fast parsing
Xml.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
XmlNode.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Words.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Unicode.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
UCWordIterator.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
UCPropTable.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
UnicodeProperties.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
UCNormalizer.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Pos.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Pops.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Bits.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Scores.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Sections.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Weights.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
neighborhood.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
TermTable.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
#Summary.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Title.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
# fast relate topics generation
Msg24.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Msg1a.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Msg1b.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
SafeBuf.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
Msg1c.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -c $*.cpp
2013-08-03 00:12:24 +04:00
Msg1d.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -c $*.cpp
2013-08-03 00:12:24 +04:00
AutoBan.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Profiler.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
HtmlCarver.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
HashTableT.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Timedb.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
HashTableX.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
SpiderCache.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
DateParse.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
#DateParse2.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
test_parser2.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
Language.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
WordsWindow.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
AppendingWordsWindow.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
PostQueryRerank.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O2 -c $*.cpp
2013-08-03 00:12:24 +04:00
sort.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
# SiteBonus.o:
2014-06-10 05:48:58 +04:00
# $(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
Msg6a.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -O3 -c $*.cpp
2013-08-03 00:12:24 +04:00
# Stupid gcc-2.95 stabs debug can't handle such a big file.
geo_ip_table.o: geo_ip_table.cpp geo_ip_table.h
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) -m32 -Wall -pipe -c $*.cpp
2014-05-23 08:01:30 +04:00
# dpkg-buildpackage calls 'make binary' to create the files for the deb pkg
# which must all be stored in ./debian/gb/
2014-05-23 08:01:30 +04:00
2014-05-11 23:48:56 +04:00
install:
# gigablast will copy over the necessary files. it has a list of the
# necessary files and that list changes over time so it is better to let gb
# deal with it.
mkdir -p $(DESTDIR)/var/gigablast/data0/
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/etc/init.d/
mkdir -p $(DESTDIR)/etc/init/
2014-06-25 16:31:05 +04:00
mkdir -p $(DESTDIR)/etc/rc3.d/
mkdir -p $(DESTDIR)/lib/init/
./gb copyfiles $(DESTDIR)/var/gigablast/data0/
2014-05-23 05:46:38 +04:00
# if user types 'gb' it will use the binary in /var/gigablast/data0/gb
rm -f $(DESTDIR)/usr/bin/gb
ln -s /var/gigablast/data0/gb $(DESTDIR)/usr/bin/gb
2014-05-23 05:46:38 +04:00
# if machine restarts...
2014-05-12 01:47:46 +04:00
# the new way that does not use run-levels anymore
# rm -f $(DESTDIR)/etc/init.d/gb
# ln -s /lib/init/upstart-job $(DESTDIR)/etc/init.d/gb
2014-05-12 01:47:46 +04:00
# initctl upstart-job conf file (gb stop|start|reload)
# cp init.gb.conf $(DESTDIR)/etc/init/gb.conf
2014-06-25 16:31:05 +04:00
cp S99gb $(DESTDIR)/etc/init.d/gb
ln -s /etc/init.d/gb $(DESTDIR)/etc/rc3.d/S99gb
2014-05-11 23:48:56 +04:00
2013-08-03 00:12:24 +04:00
.cpp.o:
2014-06-10 05:48:58 +04:00
$(CC) $(DEFS) $(CPPFLAGS) -c $*.cpp
2013-08-03 00:12:24 +04:00
#.cpp: $(OBJS)
# $(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.o $(OBJS) $(LIBS)
# $(CC) $(DEFS) $(CPPFLAGS) -o $@ $@.cpp $(OBJS) $(LIBS)
##
## Auto dependency generation
## This is broken, if you edit Version.h and recompile it doesn't work. (mdw)
#%.d: %.cpp
# @echo "generating dependency information for $<"
# @set -e; $(CC) -M $(DEFS) $(CPPFLAGS) $< \
# | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
# [ -s $@ ] || rm -f $@
#-include $(SRCS:.cpp=.d)
depend:
@echo "generating dependency information"
( $(CC) -MM $(DEFS) $(DPPFLAGS) *.cpp > Make.depend ) || \
$(CC) -MM $(DEFS) $(DPPFLAGS) *.cpp > Make.depend
-include Make.depend
2014-06-09 02:24:30 +04:00
# REDHAT PACKAGE SECTION BEGIN
# try building the .deb and then running 'alien --to-rpm gb_1.0-1_i386.deb'
# to build the .rpm
# move this tarball into ~/rpmbuild/?????
# then run rpmbuild -ba gb-1.0.spec to build the rpms
# rpm -ivh gb-1.0-... to install the pkg
testing-rpm:
git archive --format=tar --prefix=gb-1.0/ testing > gb-1.0.tar
mv gb-1.0.tar /home/mwells/rpmbuild/SOURCES/
rpmbuild -bb gb-1.0.spec
scp /home/mwells/rpmbuild/RPMS/x86_64/gb-*rpm www.gigablast.com:/w/html/
master-rpm:
git archive --format=tar --prefix=gb-1.0/ master > gb-1.0.tar
mv gb-1.0.tar /home/mwells/rpmbuild/SOURCES/
rpmbuild -bb gb-1.0.spec
scp /home/mwells/rpmbuild/RPMS/x86_64/gb-*rpm www.gigablast.com:/w/html/
# REDHAT PACKAGE SECTION END
# DEBIAN PACKAGE SECTION BEGIN
2014-06-17 07:50:32 +04:00
# need to do 'apt-get intall dh-make'
# deb-master
2014-06-18 16:37:06 +04:00
master-deb:
2014-08-28 08:09:21 +04:00
git archive --format=tar --prefix=gb-1.10/ master > ../gb_1.10.orig.tar
rm -rf debian
# change "-p gb_1.0" to "-p gb_1.1" to update version for example
2014-08-28 08:09:21 +04:00
dh_make -e gigablast@mail.com -p gb_1.10 -f ../gb_1.10.orig.tar
# zero this out, it is just filed with the .txt files erroneously and it'll
# try to automatiicaly install in /usr/docs/
rm debian/docs
touch debian/docs
2014-06-20 20:20:13 +04:00
# make the debian/copyright file contain the license
cp copyright.head debian/copyright
# cat LICENSE | awk -Fxvcty '{print " "$1}' >> debian/copyright
cat LICENSE >> debian/copyright
cat copyright.tail >> debian/copyright
# the control file describes the package
cp control.deb debian/control
# try to use our own rules so we can override dh_shlibdeps and others
cp gb.deb.rules debian/rules
2014-07-06 05:51:49 +04:00
cp changelog debian/changelog
# fix dh_shlibdeps from bitching about dependencies on shared libs
# YOU HAVE TO RUN THIS before you run 'make'
# export LD_LIBRARY_PATH=./debian/gb/var/gigablast/data0
# build the package now
dpkg-buildpackage -nc -ai386 -ti386 -b -uc -rfakeroot
2014-06-20 20:20:13 +04:00
# move to current dur
mv ../gb_*.deb .
# upload den
scp gb*.deb gk268:/w/html/
# alien it
2014-08-28 08:09:21 +04:00
sudo alien --to-rpm gb_1.10-1_i386.deb
2014-06-20 20:20:13 +04:00
# upload rpm
scp gb*.rpm gk268:/w/html/
#deb-testing
testing-deb:
2014-07-22 22:01:42 +04:00
git archive --format=tar --prefix=gb-1.5/ testing > ../gb_1.5.orig.tar
rm -rf debian
# change "-p gb_1.0" to "-p gb_1.1" to update version for example
2014-07-22 22:01:42 +04:00
dh_make -e gigablast@mail.com -p gb_1.5 -f ../gb_1.5.orig.tar
# zero this out, it is just filed with the .txt files erroneously and it'll
# try to automatiicaly install in /usr/docs/
rm debian/docs
touch debian/docs
2014-06-17 07:50:32 +04:00
# make the debian/copyright file contain the license
cp copyright.head debian/copyright
# cat LICENSE | awk -Fxvcty '{print " "$1}' >> debian/copyright
cat LICENSE >> debian/copyright
cat copyright.tail >> debian/copyright
# the control file describes the package
cp control.deb debian/control
# try to use our own rules so we can override dh_shlibdeps and others
cp gb.deb.rules debian/rules
2014-07-06 05:51:49 +04:00
cp changelog debian/changelog
# make the pkg dependencies file ourselves since we overrode dh_shlibdeps
# with our own debian/rules file. see that file for more info.
# echo "shlibs:Depends=libc6 (>= 2.3)" > debian/gb.substvars
# echo "shlibs:Depends=netpbm (>= 0.0)" > debian/gb.substvars
# echo "misc:Depends=netpbm (>= 0.0)" > debian/gb.substvars
# fix dh_shlibdeps from bitching about dependencies on shared libs
# YOU HAVE TO RUN THIS before you run 'make'
# export LD_LIBRARY_PATH=./debian/gb/var/gigablast/data0
# build the package now. if we don't specify -ai386 -ti386 then some users
# get a wrong architecture msg and 'dpkg -i' fails
dpkg-buildpackage -nc -ai386 -ti386 -b -uc -rfakeroot
# dpkg-buildpackage -nc -b -uc -rfakeroot
2014-06-17 07:50:32 +04:00
# move to current dur
mv ../gb_*.deb .
install-pkgs-local:
2014-07-22 22:01:42 +04:00
sudo alien --to-rpm gb_1.5-1_i386.deb
2014-06-17 07:50:32 +04:00
# upload
scp gb*.deb gb*.rpm gk268:/w/html/
# DEBIAN PACKAGE SECTION END
2014-06-08 22:49:26 +04:00