-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 802 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 802 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
# Makefile for dedup (FASTQ deduplication tool)
# Supports macOS (Homebrew) and Linux
CXX = g++
CXXFLAGS = -std=c++17 -O3 -Wall
LDFLAGS = -lz -lssl -lcrypto -lsqlite3
# Detect OS
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin) # macOS
CXXFLAGS += -I/opt/homebrew/opt/zlib/include \
-I/opt/homebrew/opt/openssl@3/include \
-I/opt/homebrew/opt/sqlite/include
LDFLAGS += -L/opt/homebrew/opt/zlib/lib \
-L/opt/homebrew/opt/openssl@3/lib \
-L/opt/homebrew/opt/sqlite/lib
endif
# Target binary
TARGET = dedup
# Sources
SRCS = dedup.cpp
OBJS = $(SRCS:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LDFLAGS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(OBJS) $(TARGET)