File: Makefile

package info (click to toggle)
skewer 0.2.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 332 kB
  • sloc: cpp: 5,384; makefile: 46; sh: 42
file content (51 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (2)
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
CXX=g++
DEBUG?=0
CXXFLAGS?=
LDLIBS?=
ifneq ($(OS), Windows_NT)
	UNAME_S := $(shell uname -s)
	ifeq ($(UNAME_S), Darwin)
		LDFLAGS+=-lpthread
		LDLIBS=
	else
		LDFLAGS+=-pthread
	endif
else
	LDLIBS=-lrt
endif
SRC=src
SOURCES=$(SRC)/main.cpp $(SRC)/parameter.cpp $(SRC)/matrix.cpp $(SRC)/fastq.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=skewer

ifeq ($(DEBUG), 1)
	CXXFLAGS += -O0 -g -Wall -D_DEBUG
else
	CXXFLAGS += -O2
endif

.PHONY: all debug clean

all:$(EXECUTABLE)

debug:
	$(MAKE) $(MAKEFILE) DEBUG=1

$(EXECUTABLE):$(OBJECTS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ $(LDLIBS)

.cpp.o:
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@

$(SRC)/main.o: $(SRC)/parameter.h $(SRC)/matrix.h $(SRC)/fastq.h $(SRC)/common.h
$(SRC)/parameter.o: $(SRC)/parameter.h $(SRC)/fastq.h $(SRC)/common.h
$(SRC)/matrix.o: $(SRC)/matrix.h $(SRC)/common.h
$(SRC)/fastq.o: $(SRC)/fastq.h $(SRC)/common.h

# Clean
clean:
	rm -rf $(OBJECTS) $(EXECUTABLE)

# Install
install:
	mv -f $(EXECUTABLE) /usr/local/bin