-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.in
executable file
·60 lines (47 loc) · 1.85 KB
/
Makefile.in
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
CC=@CC@
LD=@CC@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
CFLAGS=@CFLAGS@
PREFIX=@prefix@
DESTDIR ?=
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
SRCDIR = $(PREFIX)/src
INCLUDEDIR = $(PREFIX)/include
ifeq ($(shell uname), Darwin)
EXT_SHARED = dylib
CFLAGS += -dynamiclib
else
EXT_SHARED = so
CFLAGS += -fPIC
endif
BFT_SRC_DIR = src
BFT_INC_DIR = include
BFT_CPPFLAGS = -I$(BFT_INC_DIR)
BFT_FLAGS = $(BFT_CPPFLAGS) $(CFLAGS)
BFT_FILES_O := $(BFT_SRC_DIR)/getRSS.o $(BFT_SRC_DIR)/annotation.o $(BFT_SRC_DIR)/branchingNode.o $(BFT_SRC_DIR)/popcnt.o\
$(BFT_SRC_DIR)/log2.o $(BFT_SRC_DIR)/extract_kmers.o $(BFT_SRC_DIR)/fasta.o $(BFT_SRC_DIR)/file_io.o $(BFT_SRC_DIR)/Node.o\
$(BFT_SRC_DIR)/UC.o $(BFT_SRC_DIR)/insertNode.o $(BFT_SRC_DIR)/bft.o $(BFT_SRC_DIR)/intersection.o $(BFT_SRC_DIR)/list.o \
$(BFT_SRC_DIR)/main.o $(BFT_SRC_DIR)/useful_macros.o $(BFT_SRC_DIR)/marking.o $(BFT_SRC_DIR)/merge.o $(BFT_SRC_DIR)/presenceNode.o\
$(BFT_SRC_DIR)/printMemory.o $(BFT_SRC_DIR)/quicksort.o $(BFT_SRC_DIR)/CC.o $(BFT_SRC_DIR)/replaceAnnotation.o\
$(BFT_SRC_DIR)/retrieveAnnotation.o $(BFT_SRC_DIR)/snippets.o $(BFT_SRC_DIR)/write_to_disk.o $(BFT_SRC_DIR)/xxhash.o
all: libbft bft clean_files
libbft: $(BFT_FILES_O)
$(LD) -shared -o $@.$(EXT_SHARED) $^ $(LDFLAGS) $(LIBS)
bft: $(BFT_FILES_O)
$(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
$(BFT_FILES_O): %.o: %.c
$(CC) $(BFT_FLAGS) -c $< -o $@
install:
@install -d -m 755 $(DESTDIR)$(LIBDIR)/ $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(INCLUDEDIR)/bft $(DESTDIR)$(SRCDIR)/bft
@install -m 755 libbft.$(EXT_SHARED) $(DESTDIR)$(LIBDIR)/libbft.$(EXT_SHARED)
@install -m 755 bft $(DESTDIR)$(BINDIR)/bft
@install -m 644 $(BFT_INC_DIR)/*.h $(DESTDIR)$(INCLUDEDIR)/bft
@install -m 644 $(BFT_SRC_DIR)/*.c $(DESTDIR)$(SRCDIR)/bft
@echo BFT installation finished
clean_files:
rm -f $(BFT_FILES_O)
clean: clean_files
rm -f bft libbft.$(EXT_SHARED)
.PHONY: clean