-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
60 lines (39 loc) · 1.32 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
CC=gcc
CFLAGS= -Wall -Wextra -std=c11 -pedantic
SRCDIR= src
INC= -Ilibs -I.
LIB= -L.
LIBS= -lz -lzstd -lpthread
SRC=sqzlib/sqz_init.c sqzlib/sqz_kseq.c sqzlib/sqz_coding.c\
sqzlib/sqz_zlib.c sqzlib/sqz_zstd.c sqzlib/sqz_filefun.c
OBJS=$(SRC:%.c=$(SRCDIR)/%.o)
OBJSB=$(SRC:%.c=$(SRCDIR)/%B.o)
.PHONY:all clean wipe
.SUFFIXES:.c .o
all:libsqz sqzthreads sqz
%.o:%.c
$(CC) $(CFLAGS) $(INC) -O3 -c $< -o $@
%B.o:%.c
$(CC) $(CFLAGS) $(INC) -g -c $< -o $@
sqzthreads:
$(CC) $(CFLAGS) $(INC) -Wno-unused-function -O3 -c -o src/sqz_threads.o src/sqz_threads.c
sqzthreadsB:
$(CC) $(CFLAGS) $(INC) -Wno-unused-function -g -c -o src/sqz_threadsB.o src/sqz_threads.c
libsqzflag:
$(info >>>>>Building libsqz<<<<<)
sqzflag:
$(info >>>>>Building sqz<<<<<)
libsqz:libsqzflag $(OBJS)
ar rcs $@.a $(OBJS)
cp src/sqzlib/sqzlib.h .
libsqzB:libsqzflag $(OBJSB)
ar rcs libsqz.a $(OBJSB)
cp src/sqzlib/sqzlib.h .
sqz:sqzflag sqzthreads
$(CC) $(CFLAGS) $(INC) $(LIB) -Wno-unused-function -o $@ $(SRCDIR)/sqz.c src/sqz_threads.o libsqz.a $(LIBS)
sqzB:sqzflag sqzthreadsB
$(CC) $(CFLAGSB) $(INC) $(LIB) -o sqz $(SRCDIR)/sqz.c src/sqz_threadsB.o libsqz.a $(LIBS)
build:clean libsqzB sqzB
clean:
rm -rf sqz libsqz.a sqzlib.h sqz_data.h $(SRCDIR)/sqzlib/*.o $(SRCDIR)/*.o
# makedepend line not in use in current compilation enviroanment