blob: 21507106f2a4f8757f51abb76ad159b940079544 (
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++
PKGCONFIG=pkg-config
CXXFLAGS+=-Wall -Wextra -Dcimg_use_jpeg=1 -Dcimg_use_png=1 -Dcimg_display=0 -Dcimg_plugin='"jpeg_buffer.h"' -g
CXXFLAGS+= \
$(shell $(PKGCONFIG) --cflags libcurl) \
$(shell $(PKGCONFIG) --cflags libjpeg) \
$(shell $(PKGCONFIG) --cflags libpng)
LIBS+= \
$(shell $(PKGCONFIG) --libs libcurl) \
$(shell $(PKGCONFIG) --libs libjpeg) \
$(shell $(PKGCONFIG) --libs libpng)
ifneq ($(strip $(ENABLE_SANITIZER)),)
CXXFLAGS+=-fsanitize=address -fsanitize=leak -fsanitize=undefined
endif
APP:=github-avatar-ukrainify
HEADERS:=GithubAPI.hpp ImageManipulation.hpp
SOURCES:=GithubAPI.cpp ImageManipulation.cpp main.cpp
all: $(APP)
$(APP): $(HEADERS) $(SOURCES)
$(PKGCONFIG) --exist libcurl || false
$(PKGCONFIG) --exist libjpeg || false
$(PKGCONFIG) --exist libpng || false
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(SOURCES) -o $@ $(LIBS)
clean:
rm -f $(APP)
|