i2pd-tools/Makefile

64 lines
1.4 KiB
Makefile
Raw Normal View History

I2PD_PATH = i2pd
2017-04-20 20:26:10 +02:00
LIBI2PD_PATH = $(I2PD_PATH)/libi2pd
LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client
2016-09-16 17:28:01 +02:00
CXX = g++
FLAGS = -g -Wall -std=c++11
2017-04-20 20:26:10 +02:00
INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH)
CXXFLAGS = $(FLAGS) $(INCFLAGS)
2017-04-20 20:26:10 +02:00
LDFLAGS = -Wl,-rpath,/usr/local/lib
LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lssl -lcrypto -lpthread -lrt -lz
2016-09-16 17:28:01 +02:00
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
I2PD_LIB = libi2pd.a
2017-08-07 19:50:35 +02:00
all: keygen keyinfo famtool routerinfo regaddr vain
2016-11-25 15:55:22 +01:00
routerinfo: $(OBJECTS)
$(CXX) -o routerinfo routerinfo.o $(LDFLAGS) $(LIBS)
2016-09-16 17:28:01 +02:00
keygen: $(OBJECTS)
$(CXX) -o keygen keygen.o $(LDFLAGS) $(LIBS)
keyinfo: $(OBJECTS)
$(CXX) -o keyinfo keyinfo.o $(LDFLAGS) $(LIBS)
2016-10-24 19:19:33 +02:00
famtool: $(OBJECTS)
$(CXX) -o famtool famtool.o $(LDFLAGS) $(LIBS)
2017-02-25 04:23:48 +01:00
regaddr: $(OBJECTS)
$(CXX) -o regaddr regaddr.o $(LDFLAGS) $(LIBS)
2017-08-07 19:50:35 +02:00
vain: $(OBJECTS)
2017-08-14 19:59:28 +02:00
$(CXX) -o vain vanitygen.o $(LDFLAGS) $(LIBS)
2017-08-07 19:50:35 +02:00
$(OBJECTS): libi2pd.a
2016-09-16 17:28:01 +02:00
.SUFFIXES:
.SUFFIXES: .c .cc .C .cpp .o
$(I2PD_LIB):
$(MAKE) -C $(I2PD_PATH) mk_obj_dir $(I2PD_LIB)
%.o: %.cpp libi2pd.a
2016-09-16 17:28:01 +02:00
$(CXX) -o $@ -c $(CXXFLAGS) $< $(INCFLAGS)
count:
wc *.c *.cc *.C *.cpp *.h *.hpp
clean-i2pd:
$(MAKE) -C $(I2PD_PATH) clean
clean-obj:
rm -f $(OBJECTS)
clean-bin:
2017-04-20 20:26:10 +02:00
rm -f keyinfo keygen famtool regaddr routerinfo
clean: clean-i2pd clean-obj clean-bin
2016-09-16 17:28:01 +02:00
.PHONY: all
.PHONY: count
.PHONY: clean