76 lines
1.8 KiB
Makefile
76 lines
1.8 KiB
Makefile
|
|
AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo subdir-objects
|
|
|
|
CXXFLAGS = -std=c++23 -Wall -I. -pthread -D_GNU_SOURCE=1 -MMD -MP
|
|
LDFLAGS = -pthread
|
|
LIBS = -Wl,--as-need -lprotobuf
|
|
|
|
sbin_PROGRAMS = helmetd helmetcli
|
|
|
|
helmetcli_SOURCES = helmetcli.cpp $(helmet_SOURCES)
|
|
helmetd_SOURCES = helmetd.cpp $(helmet_SOURCES)
|
|
|
|
helmet_SOURCES = \
|
|
abrpchandler.cpp abrpchandler.hpp \
|
|
control.pb.cc control.pb.h \
|
|
interface.cpp interface.hpp \
|
|
iprouter.cpp iprouter.hpp \
|
|
logger.cpp logger.hpp \
|
|
netclient.cpp netclient.hpp \
|
|
resolver.cpp resolver.hpp \
|
|
rpcclient.cpp rpcclient.hpp \
|
|
msgheader.cpp msgheader.hpp \
|
|
service.cpp service.hpp \
|
|
tcpclient.cpp tcpclient.hpp \
|
|
testconnect.cpp testconnect.hpp \
|
|
tunclient.cpp tunclient.hpp \
|
|
udpclient.cpp udpclient.hpp
|
|
|
|
noinst_PROGRAMS = \
|
|
tcpclient_test \
|
|
udpclient_test \
|
|
service_test \
|
|
tunclient_test \
|
|
rpcclient_test \
|
|
rpcclient_msg_test \
|
|
testconnect_test
|
|
|
|
tunclient_test_SOURCES = tunclient_test.cpp \
|
|
tunclient.cpp tunclient.hpp \
|
|
interface.cpp interface.hpp
|
|
|
|
service_test_SOURCES = service_test.cpp $(helmet_SOURCES)
|
|
udpclient_test_SOURCES = udpclient_test.cpp $(helmet_SOURCES)
|
|
tcpclient_test_SOURCES = tcpclient_test.cpp $(helmet_SOURCES)
|
|
rpcclient_test_SOURCES = rpcclient_test.cpp $(helmet_SOURCES)
|
|
rpcclient_msg_test_SOURCES = rpcclient_msg_test.cpp $(helmet_SOURCES)
|
|
|
|
testconnect_test_SOURCES = testconnect_test.cpp $(helmet_SOURCES)
|
|
|
|
#test: testconnect_test
|
|
# ./testconnect_test
|
|
#test: rpcclient_test
|
|
# ./rpcclient_test
|
|
|
|
test: service_test rpcclient_test
|
|
|
|
proto:
|
|
$(PROTOC) --cpp_out=. control.proto
|
|
|
|
control.pb.cc control.pb.h: control.proto
|
|
$(PROTOC) --cpp_out=. control.proto
|
|
|
|
ASTYLE_OPTS = --indent=spaces=8 --style=java
|
|
format:
|
|
$(ASTYLE) $(ASTYLE_OPTS) *.hpp *.cpp
|
|
|
|
clean-local:
|
|
rm -rf autom4te.cache
|
|
rm -f *~
|
|
rm -f *.o
|
|
rm -f *.orig
|
|
rm -f *.d
|
|
|
|
-include *.d
|
|
|