-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (33 loc) · 884 Bytes
/
Makefile
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
CXX=g++
CXXFLAGS=-O3 -static -std=c++17 -ICryptoPP -ILodePNG -LCryptoPP
LDFLAGS=-Wl,-flto -Wl,-O2
LDLIBS=-lstdc++fs -l:libcryptopp.a
CPPFLAGS=
LIBZOPFLI=
INCLUDEZOPFLI=
all: install
install: cryptopp zopfli
cd Steganography; \
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDEZOPFLI) -o SteganoPNG SteganoPNG.cpp ConfigurationManager.cpp LodePNG/lodepng.cpp $(LDLIBS) $(LIBZOPFLI); \
strip SteganoPNG; \
cd ..; \
mkdir -p build; \
mv Steganography/SteganoPNG build/SteganoPNG
zopfli:
ifeq (-DUSEZOPFLI,$(CPPFLAGS))
ifeq (,$(wildcard ./Steganography/zopfli/libzopfli.a))
cd Steganography/zopfli/; \
cmake .; \
cmake --build .
endif
LIBZOPFLI := -l:libzopfli.a
INCLUDEZOPFLI := -Izopfli/src/zopfli/ -Lzopfli
endif
cryptopp:
ifeq (,$(wildcard ./Steganography/CryptoPP/libcryptopp.a))
cd Steganography/CryptoPP/; \
make
endif
clean:
rm -rf build/* \
rm Steganography/SteganoPNG