-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 924 Bytes
/
Makefile
File metadata and controls
41 lines (29 loc) · 924 Bytes
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 = sabre
VERSION = 1.00
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
barcode.o: $(SDIR)/barcode.c
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
demulti_single.o: $(SDIR)/demulti_single.c $(SDIR)/sabre.h $(SDIR)/kseq.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
demulti_paired.o: $(SDIR)/demulti_paired.c $(SDIR)/sabre.h $(SDIR)/kseq.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
sabre.o: $(SDIR)/sabre.c $(SDIR)/sabre.h
$(CC) $(CFLAGS) $(OPT) -c $(SDIR)/$*.c
clean:
rm -rf *.o $(SDIR)/*.gch ./sabre
distclean: clean
rm -rf *.tar.gz
dist:
tar -zcf $(ARCHIVE).tar.gz src Makefile
build: barcode.o demulti_single.o demulti_paired.o sabre.o
$(CC) $(CFLAGS) $(OPT) $? -o $(PROGRAM_NAME) $(LDFLAGS)
debug:
$(MAKE) build "CFLAGS=-Wall -pedantic -g -DDEBUG"