forked from kemonomachi/experhash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 675 Bytes
/
Makefile
File metadata and controls
26 lines (18 loc) · 675 Bytes
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
erlang_base = $(shell erl -eval 'io:format("~s", [code:root_dir()])' -s init stop -noshell)/usr
CXXFLAGS += -std=c++11 -g $(shell pkg-config --cflags Magick++) -I$(erlang_base)/include -L$(erlang_base)/lib
LDFLAGS += -lei $(shell pkg-config --libs Magick++)
sources = $(wildcard cpp/src/*.cpp)
objects = $(sources:.cpp=.o)
header_deps = $(sources:.cpp=.d)
priv/experhash_port: $(objects) | priv
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
priv:
mkdir -p $@
cpp/src/%.d: cpp/src/%.cpp
@set -e; \
rm -f $@; \
$(CXX) -MM -MT '$(@:.d=.o) $@' -MF $@ $(CPPFLAGS) $(CXXFLAGS) $<
include $(header_deps)
.PHONY: clean
clean:
rm -f priv/exphash_port $(objects) $(header_deps)