aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 87bf6167e7a3d3da66b13440a5dfafdb7f5842db (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
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++0x -fwrapv
ifneq ($(DEBUG),)
	CXXFLAGS += -g
else
	CXXFLAGS += -O2
endif

LIBNAME = cryptolib.a


.PHONY: all clean remake

all: $(LIBNAME)

clean:
	rm -rf $(LIBNAME) *.o

remake: clean all


$(LIBNAME): $(patsubst %.cpp,%.o,$(wildcard *.cpp))
	ar -cr $@ $^

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