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
|
include $(NCBI)/ncbi.mk
INCLUDES = -I . -I$(NCBI_INCDIR)
CCOPT= -g -DSYSV=1
CFLAGS=$(CCOPT) $(INCLUDES) #-DDEBUG_ASN_PRINT
CODEGEN=$(NCBI)/bin/asncode
ASNTOOL=$(NCBI)/bin/asntool
NCBI_USED=/am/ncbiapdata/asn/seqset.asn
NCBI_REFS=/am/ncbiapdata/asn/seq.asn,/am/ncbiapdata/asn/seqfeat.asn,/am/ncbiapdata/asn/seqloc.asn,/am/ncbiapdata/asn/general.asn,/am/ncbiapdata/asn/seqalign.asn,/am/ncbiapdata/asn/seqcode.asn,/am/ncbiapdata/asn/seqres.asn
all: libncbiid2.a
#id2.o: id2.c id2.h
# cpp -C -P -D_DEBUG -I. -I$(NCBI)/include id2.c >id2.i
# cc -xildoff -c -g -D_DEBUG -I. -I$(NCBI)/include id2.c
# $(NCBI_CC) -g -xildoff -c id2.i
libncbiid2.a : id2.o id2sgen.o
rm -f $@
ar -q $@ id2.o
- rm -f *.l
id2.o: id2.c id2gen.h id2map.h id2sgen.h
id2sgen.o: id2sgen.c id2sgen.h id2map.h seqsplit.h
id2sgen.c id2sgen.h: seqsplit.l all.l
$(CODEGEN) -i id2map.h -l seqsplit.l,all.l -o id2sgen -d .
cat id2sgen.c | grep -v "^ *\* *Generated" >x && mv x id2sgen.c
cat id2sgen.h | grep -v "^ *\* *Generated" >x && mv x id2sgen.h
id2.c id2gen.h: id2.l id2.h all.l seqsplit.l
$(CODEGEN) -i id2map.h -l id2.l,seqsplit.l,all.l -o id2gen -d .
cat id2gen.c | grep -v "^ *\* *Generated" > id2.c && rm -f id2gen.c
cat id2gen.h | grep -v "^ *\* *Generated" > x && mv x id2gen.h
@patch id2.c <id2.patch
id2.l : id2.asn
$(ASNTOOL) -m id2.asn -l x.h
cat x.l* | sed 's/x[.]l[0-9]*/id2.l/g' >id2.l
rm -f x.*
seqsplit.l : seqsplit.asn
$(ASNTOOL) -m seqsplit.asn -l x.h
cat x.l* | sed 's/x[.]l[0-9]*/seqsplit.l/g' >seqsplit.l
rm -f x.*
all.l :
cat $(NCBI_USED) >x.asn
$(ASNTOOL) -m x.asn -M $(NCBI_REFS) -l x.h
cat x.l* | sed 's/x[.]l[0-9]*/all.l/g' >all.l
rm -f x.*
id2.h : id2.asn
$(ASNTOOL) -m id2.asn -o id2.h
cat id2.h | grep -v "^ *\* *Generated" >x && mv x id2.h
seqsplit.h : seqsplit.asn
$(ASNTOOL) -m seqsplit.asn -o seqsplit.h
clean:
- rm -f *.l* *.c *.o *.a
- rm -f id2.h id2gen.h id2sgen.h seqsplit.h
- rm -f id2generr id2genout
|