Some useful tools for I2P
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.7 KiB

I2PD_PATH = i2pd
LIBI2PD_PATH = $(I2PD_PATH)/libi2pd
LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client
8 years ago
CXX = g++
FLAGS = -Wall -std=c++11 -Wno-misleading-indentation
ifneq ($(UNAME),Darwin && $(UNAME),Linux)
FLAGS += -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN
BOOST_SUFFIX = -mt
else
FLAGS += -g
endif
INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH)
CXXFLAGS = $(FLAGS)
LDFLAGS = -Wl,-rpath,/usr/local/lib
LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lpthread -lz
ifeq ($(UNAME),Darwin || $(UNAME),Linux)
LIBS += -lrt
else
LIBS += -lws2_32 -lwsock32 -lstdc++ -liphlpapi
endif
8 years ago
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
I2PD_LIB = libi2pd.a
all: keygen keyinfo famtool routerinfo regaddr vain
routerinfo: $(OBJECTS)
$(CXX) -o routerinfo routerinfo.o $(LDFLAGS) $(LIBS)
8 years ago
keygen: $(OBJECTS)
$(CXX) -o keygen keygen.o $(LDFLAGS) $(LIBS)
keyinfo: $(OBJECTS)
$(CXX) -o keyinfo keyinfo.o $(LDFLAGS) $(LIBS)
8 years ago
famtool: $(OBJECTS)
$(CXX) -o famtool famtool.o $(LDFLAGS) $(LIBS)
8 years ago
regaddr: $(OBJECTS)
$(CXX) -o regaddr regaddr.o $(LDFLAGS) $(LIBS)
vain: $(OBJECTS)
7 years ago
$(CXX) -o vain vanitygen.o $(LDFLAGS) -mavx $(LIBS)
$(OBJECTS): libi2pd.a
8 years ago
.SUFFIXES:
.SUFFIXES: .c .cc .C .cpp .o
$(I2PD_LIB):
$(MAKE) -C $(I2PD_PATH) mk_obj_dir $(I2PD_LIB)
%.o: %.cpp libi2pd.a
$(CXX) -o $@ -c $(CXXFLAGS) $(INCFLAGS) $<
8 years ago
count:
wc *.c *.cc *.C *.cpp *.h *.hpp
clean-i2pd:
$(MAKE) -C $(I2PD_PATH) clean
clean-obj:
rm -f $(OBJECTS)
clean-bin:
rm -f keyinfo keygen famtool regaddr routerinfo
clean: clean-i2pd clean-obj clean-bin
8 years ago
.PHONY: all
.PHONY: count
.PHONY: clean