-
Notifications
You must be signed in to change notification settings - Fork 68
/
Makefile
37 lines (28 loc) · 916 Bytes
/
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
# Use ?= to allow overriding from the env or command-line, e.g.
#
# make CXXFLAGS="-O3 -fPIC" install
#
# Package managers will override many of these variables automatically, so
# this is aimed at making it easy to create packages (Debian packages,
# FreeBSD ports, MacPorts, pkgsrc, etc.)
CXX ?= c++
CXXFLAGS += -Wall
DESTDIR ?= stage
PREFIX ?= /usr/local
MKDIR ?= mkdir
INSTALL ?= install -c
STRIP ?= strip
BIN = interval_tree_test
all: ${BIN}
${BIN}: interval_tree_test.cpp IntervalTree.h
${CXX} $(CPPFLAGS) ${CXXFLAGS} $(LDFLAGS) interval_tree_test.cpp -std=c++0x -o ${BIN}
install: all
${MKDIR} -p ${DESTDIR}${PREFIX}/bin
${MKDIR} -p ${DESTDIR}${PREFIX}/include/intervaltree
${INSTALL} ${BIN} ${DESTDIR}${PREFIX}/bin
${INSTALL} IntervalTree.h ${DESTDIR}${PREFIX}/include/intervaltree
install-strip: install
${STRIP} ${DESTDIR}${PREFIX}/bin/${BIN}
.PHONY: clean
clean:
rm -rf ${BIN} ${DESTDIR}