-
Notifications
You must be signed in to change notification settings - Fork 582
/
Makefile
64 lines (51 loc) · 1.63 KB
/
Makefile
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
CC= gcc
CXX= g++
CFLAGS= -g -Wall -O2 -m64 #-arch ppc
CXXFLAGS= $(CFLAGS)
DFLAGS= -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 #-D_NO_RAZF #-D_NO_CURSES
OBJS= bam.o bam_import.o bam_pileup.o bam_lpileup.o bam_sort.o bam_index.o \
razf.o bgzf.o faidx.o bam_tview.o bam_maqcns.o bam_aux.o bam_plcmd.o \
bam_mate.o bam_rmdup.o glf.o bam_stat.o kstring.o
PROG= razip bgzip samtools
INCLUDES=
LIBS= -lm -lz
SUBDIRS= . misc
.SUFFIXES:.c .o
.c.o:
$(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
all-recur lib-recur clean-recur cleanlocal-recur install-recur:
@target=`echo $@ | sed s/-recur//`; \
wdir=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
cd $$subdir; \
$(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
INCLUDES="$(INCLUDES)" LIBS="$(LIBS)" $$target || exit 1; \
cd $$wdir; \
done;
all:$(PROG)
lib:libbam.a
libbam.a:$(OBJS)
$(AR) -cru $@ $(OBJS)
samtools:lib bamtk.o
$(CC) $(CFLAGS) -o $@ bamtk.o $(LIBS) -L. -lbam -lcurses
razip:razip.o razf.o
$(CC) $(CFLAGS) -o $@ razf.o razip.o $(LIBS)
bgzip:bgzip.o bgzf.o
$(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o $(LIBS)
razip.o:razf.h
bam.o:bam.h razf.h bam_endian.h
bam_import.o:bam.h kseq.h khash.h razf.h
bam_pileup.o:bam.h razf.h ksort.h
bam_plcmd.o:bam.h faidx.h bam_maqcns.h glf.h
bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
bam_lpileup.o:bam.h ksort.h
bam_tview.o:bam.h faidx.h bam_maqcns.h
bam_maqcns.o:bam.h ksort.h bam_maqcns.h
bam_sort.o:bam.h ksort.h razf.h
razf.o:razf.h
glf.o:glf.h
faidx.o:faidx.h razf.h khash.h
faidx_main.o:faidx.h razf.h
cleanlocal:
rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a
clean:cleanlocal-recur