forked from bcthomas/sickle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (29 loc) · 936 Bytes
/
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
PROGRAM_NAME = sickle
VERSION = 1.2
CC = gcc
CFLAGS = -Wall -pedantic -DVERSION=$(VERSION)
DEBUG = -g
OPT = -O3
ARCHIVE = $(PROGRAM_NAME)_$(VERSION)
LDFLAGS = -lz
SDIR = src
.PHONY: clean default build distclean dist debug
default: build
sliding.o: $(SDIR)/sliding.c $(SDIR)/kseq.h $(SDIR)/sickle.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
trim_single.o: $(SDIR)/trim_single.c $(SDIR)/sickle.h $(SDIR)/kseq.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
trim_paired.o: $(SDIR)/trim_paired.c $(SDIR)/sickle.h $(SDIR)/kseq.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
sickle.o: $(SDIR)/sickle.c $(SDIR)/sickle.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
clean:
rm -rf *.o $(SDIR)/*.gch ./sickle
distclean: clean
rm -rf *.tar.gz
dist:
tar -zcf $(ARCHIVE).tar.gz src Makefile
build: sliding.o trim_single.o trim_paired.o sickle.o
$(CC) $(CFLAGS) $(LDFLAGS) $(OPT) $? -o sickle
debug:
$(MAKE) build "CFLAGS=-Wall -pedantic -g -DDEBUG"