File: Makefile

package info (click to toggle)
nxtrim 0.4.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 360 kB
  • sloc: cpp: 1,593; python: 142; sh: 97; makefile: 36
file content (40 lines) | stat: -rwxr-xr-x 915 bytes parent folder | download | duplicates (2)
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
CXX ?= g++
CC ?= gcc


CXXFLAGS ?= -O2
LFLAGS = -lz

all: nxtrim

debug: CXXFLAGS += -Wall -g
debug: all

GIT_HASH := $(shell git describe --abbrev=4 --always )

VERSION = v0.4.3
GIT_VERSION =
ifneq "$(wildcard .git)" ""
GIT_VERSION = -$(shell git describe --always)
endif
version.h:
	echo '#define VERSION "$(VERSION)$(GIT_VERSION)"' > $@

OBJS=matepair.o fastqlib.o utilityfunc.o

.cpp.o:
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

nxtrim: nxtrim.cpp $(OBJS) version.h
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) nxtrim.cpp $(OBJS) $(LFLAGS) -o $@ $(LDFLAGS)
matepair.o: matepair.cpp matepair.h fastqlib.h
fastqlib.o: fastqlib.cpp fastqlib.h utilityfunc.h
utilityfunc.o:  utilityfunc.cpp utilityfunc.h
test: nxtrim
	bash -e example/run_test.sh
ecmg: nxtrim
	cd test/;bash -e ecmg.sh
clean:
	rm -f $(OBJS) nxtrim version.h
	rm -rf test/output_dir/
	rm -f test/*bam test/*pe.fastq.gz test/*mp.fastq.gz test/*unknown.fastq.gz