blob: df77c70ec8934a837ab4451780d857ee3d766849 (
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-2
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)
|