/usr/share/doc/libtokyocabinet-dev/examples/Makefile is in libtokyocabinet-dev 1.4.48-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | # Makefile for sample programs of Tokyo Cabinet
#================================================================
# Setting Variables
#================================================================
# Generic settings
SHELL = /bin/sh
# Targets
MYBINS = tcutilex tchdbex tcbdbex tcfdbex tctdbex tcadbex tctchat.cgi tctsearch.cgi
# Building binaries
CC = gcc
CFLAGS = -I. -I.. -ansi -Wall -pedantic -fsigned-char -O2
C99FLAGS = -I. -I.. -std=c99 -Wall -pedantic -fsigned-char -O2
LDFLAGS =
LIBS = -L. -L.. -ltokyocabinet -lz -lbz2 -lpthread -lm -lc
LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:..
#================================================================
# Suffix rules
#================================================================
.SUFFIXES :
.SUFFIXES : .c .o
.c.o :
$(CC) -c $(CFLAGS) $<
#================================================================
# Actions
#================================================================
all : $(MYBINS)
clean :
rm -rf $(MYBINS) *.exe *.o a.out check.out gmon.out leak.log casket* *.tct *.idx.* *~
static :
make LDFLAGS="$(LDFLAGS) -static"
.PHONY : all clean static tctchat.tct tctsearch.tct
#================================================================
# Building binaries
#================================================================
tcutilex : tcutilex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tchdbex : tchdbex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tcbdbex : tcbdbex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tcfdbex : tcfdbex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tctdbex : tctdbex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tcadbex : tcadbex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tctchat.cgi : tctchat.c
$(LDENV) $(CC) $(C99FLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tctsearch.cgi : tctsearch.c
$(LDENV) $(CC) $(C99FLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
tctchat.tct :
rm -rf tctchat.tct*
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr create tctchat.tct
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr setindex -it qgram tctchat.tct "t"
chmod 666 tctchat.tct*
tctsearch.tct :
rm -rf tctsearch.tct*
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr create tctsearch.tct
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr setindex -it qgram tctsearch.tct "text"
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr setindex -it qgram tctsearch.tct "title"
../lab/htmltotsv .. | \
LD_LIBRARY_PATH=/usr/local/lib:.:.. ../tctmgr importtsv tctsearch.tct
# END OF FILE
|