aboutsummaryrefslogtreecommitdiffstats
path: root/src/extra_tests/timing/timing-tests/Makefile
blob: 5497da9bb12f83460285d233c74d078f6582cba1 (plain)
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
CC=g++
BOTAN_DIR=../../../../../botan/
LDIR=$(BOTAN_DIR)
IDIR=$(BOTAN_DIR)build/include
DBG_FLAGS=-g -O3
LIBS=-lbotan-1.11

CPPFLAGS=$(DBG_FLAGS) -std=c++11 -I$(IDIR) -L$(LDIR) -Wl,-R$(LDIR) '-Wl,-R$$ORIGIN'
LDFLAGS=$(DBG_FLAGS) -I$(IDIR) -L$(LDIR) -Wl,-R$(LDIR) '-Wl,-R$$ORIGIN' $(LIBS)

SOURCES = $(shell find . -maxdepth 1 -name "*.cpp")
HEADERS = $(shell find . -maxdepth 1 -name "*.h")
OBJECTS = $(SOURCES:%.cpp=%.o)
BINARY = main

all: ${BINARY}

${BINARY}: $(OBJECTS) $(HEADERS)
	${CC} $(LDFLAGS) -o ${BINARY} $(OBJECTS) $(LIBS)

# rebuild objects if headers changed
$(OBJECTS): $(HEADERS)

clean:
	rm -f ${BINARY} $(OBJECTS)