-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 865 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 865 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CXX := clang++
CXXFLAGS := $(CXXFLAGS) -std=c++17 -flto -O3 -fno-exceptions -fno-rtti $(shell curl-config --cflags)
LDFLAGS := $(LDFLAGS) $(shell curl-config --libs) -fuse-ld=lld
SRCS := $(wildcard *.cc) $(wildcard utils/*.cc)
DEPS := $(SRCS:.cc=.d)
OBJS := $(SRCS:.cc=.o)
libcurl_cpp.a: $(OBJS)
llvm-ar rcsuT $@ $^
$(DEPS):
include $(wildcard $(DEPS))
# Autobuild dependency, adapted from:
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/#include
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Td
## Disable implict pattern
%.o : %.cc
%.o : %.cc %.d
$(CXX) $(CXXFLAGS) $(DEPFLAGS) -c -o $@ $<
mv -f $*.Td $*.d && touch $@
test: libcurl_cpp.a
$(MAKE) -C test/
clean:
rm -f *.o $(DEPS) $(DEPS:.d=.Td) $(OBJS) libcurl_cpp.a
$(MAKE) -C test/ clean
gendoc:
doxygen Doxyfile
cleandoc:
rm -rf doc/*
.PHONY: clean test gendoc cleandoc