mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-13 13:10:28 +00:00
77142e59ee
Signed-off-by: R4SAS <r4sas@i2pmail.org>
63 lines
2.1 KiB
Makefile
63 lines
2.1 KiB
Makefile
SYS := $(shell $(CXX) -dumpmachine)
|
|
|
|
CXXFLAGS += -Wall -Wno-unused-parameter -Wextra -pedantic -O0 -g -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1 -DOPENSSL_SUPPRESS_DEPRECATED -pthread -Wl,--unresolved-symbols=ignore-in-object-files
|
|
INCFLAGS += -I../libi2pd
|
|
|
|
LIBI2PD = ../libi2pd.a
|
|
|
|
TESTS = \
|
|
test-http-merge_chunked test-http-req test-http-res test-http-url test-http-url_decode \
|
|
test-gost test-gost-sig test-base-64 test-x25519 test-aeadchacha20poly1305 test-blinding test-elligator
|
|
|
|
ifneq (, $(findstring mingw, $(SYS))$(findstring windows-gnu, $(SYS))$(findstring cygwin, $(SYS)))
|
|
CXXFLAGS += -DWIN32_LEAN_AND_MEAN
|
|
LDFLAGS += -mwindows -static
|
|
BOOST_SUFFIX = -mt
|
|
NEEDED_LDLIBS = -lwsock32 -lws2_32 -lgdi32 -liphlpapi -lole32
|
|
endif
|
|
|
|
LDLIBS = \
|
|
-lboost_filesystem$(BOOST_SUFFIX) \
|
|
-lboost_program_options$(BOOST_SUFFIX) \
|
|
-lssl \
|
|
-lcrypto \
|
|
-lz \
|
|
$(NEEDED_LDLIBS) \
|
|
-lpthread
|
|
|
|
|
|
all: $(TESTS) run
|
|
|
|
$(LIBI2PD):
|
|
@echo "Building libi2pd.a ..." && cd .. && $(MAKE) libi2pd.a
|
|
|
|
test-http-%: test-http-%.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-base-%: test-base-%.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-gost: test-gost.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-gost-sig: test-gost-sig.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-x25519: test-x25519.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-aeadchacha20poly1305: test-aeadchacha20poly1305.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-blinding: test-blinding.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
test-elligator: test-elligator.cpp $(LIBI2PD)
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
|
|
|
run: $(TESTS)
|
|
@for TEST in $(TESTS); do echo Running $$TEST; ./$$TEST ; done
|
|
|
|
clean:
|
|
rm -f $(TESTS)
|