aboutsummaryrefslogtreecommitdiff
path: root/envelope/Makefile
blob: 64cbe4fc632c7534c6ce25ca8bd35cd63e854fc2 (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
26
27
28
29
30
31
32
33
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++0x -fwrapv
LDFLAGS =
ifneq ($(DEBUG),)
	CXXFLAGS += -g
else
	CXXFLAGS += -O2
endif
ifeq ($(shell uname),Linux)
	LDFLAGS += -lbsd
endif

BIN = envelope


.PHONY: all clean remake

all: $(BIN)

clean:
	rm -rf $(BIN) *.o *.dSYM

remake: clean all


../cryptolib.a:
	make -C .. cryptolib.a

$(BIN): $(patsubst %.cpp,%.o,$(wildcard *.cpp)) ../cryptolib.a
	$(CXX) -o $@ $^ $(LDFLAGS)

%.o: %.cpp $(wildcard *.h)
	$(CXX) $(CXXFLAGS) -c -o $@ $<