Debian Codegraph @

Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 2 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 PROGRAM_NAME = scythe
2 VERSION ='"$(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ')"'
3 CC = gcc
4 DEBUG ?= 0
5 ifeq ($(DEBUG), 1)
6 CFLAGS += -g -O0
7 else
8 CFLAGS += -O3
9 endif
10
11 ARCHIVE = $(PROGRAM_NAME)_$(VERSION)
12 override CFLAGS += -Wall -pedantic -DVERSION=$(VERSION) -std=gnu99 -fPIC
13 override LDFLAGS += -lz -lm
14 LDTESTFLAGS = -lcheck
15 SDIR = src
16 LOBJS = match.o util.o prob.o
17 OBJS = $(LOBJS) scythe.o
18
19 .PHONY: clean distclean dist testclean lib test all debian debian-clean
20
21 all: scythe test-scythe libscythe.so
22
23 # Executables
24 scythe: $(OBJS)
25 $(CC) $(CFLAGS) $(OBJS) -o scythe $(LDFLAGS)
26
27 test-scythe: $(LOBJS) tests.o
28 $(CC) $(CFLAGS) $(LOBJS) tests.o -o test-scythe $(LDFLAGS) $(LDTESTFLAGS)
29
30 %.o: $(SDIR)/%.c
31 $(CC) $(CFLAGS) -c $< -o $@
32
33 match.o: $(SDIR)/scythe.h
34 scythe.o: $(SDIR)/kseq.h $(SDIR)/scythe.h
35 util.o: $(SDIR)/kseq.h $(SDIR)/scythe.h
36 prob.o: $(SDIR)/scythe.h
37
38 # special case, source is not ./src/tests.c
39 tests.o: $(SDIR)/scythe.h src/tests/tests.c
40 $(CC) $(CFLAGS) -c src/tests/tests.c -o $@
41
42 valgrind: scythe
43 valgrind --leak-check=full --show-reachable=yes ./scythe -a solexa_adapters.fa test.fastq
44
45 test: test-scythe
46 ./test-scythe
47
48 testclean:
49 rm -rf ./tests ./test-scythe
50
51 clean:
52 rm -rf *.o ./scythe ./test-scythe ./libscythe.so *.dSYM
53
54 distclean: clean
55 rm -rf *.tar.gz
56
57 dist:
58 tar -zcf $(ARCHIVE).tar.gz src Makefile illumina_adapters.fa
59
60
61 lib: libscythe.so
62
63 libscythe.so: $(LOBJS)
64 $(CC) $(CFLAGS) -shared -o $@ $^ $(LDFLAGS)
65
66 debian:
67 mkdir -p scythe-debian
68 cp -r debian src Makefile illumina_adapters.fa scythe-debian
69 tar -zcf $(ARCHIVE).orig.tar.gz src Makefile illumina_adapters.fa
70
71 debian-clean:
72 rm -f scythe_*.deb scythe*.dsc scythe_*.build scythe_*.changes scythe_*.debian.tar.* scythe_*.orig.tar.gz
73 rm -rf scythe-debian
74 $(MAKE) clean distclean