|
|
@ -2,6 +2,7 @@ UNAME := $(shell uname -s) |
|
|
|
SHLIB := libi2pd.so |
|
|
|
SHLIB := libi2pd.so |
|
|
|
I2PD := i2p |
|
|
|
I2PD := i2p |
|
|
|
GREP := fgrep |
|
|
|
GREP := fgrep |
|
|
|
|
|
|
|
DEPS := obj/make.dep |
|
|
|
|
|
|
|
|
|
|
|
include filelist.mk |
|
|
|
include filelist.mk |
|
|
|
|
|
|
|
|
|
|
@ -32,15 +33,18 @@ api: $(SHLIB) |
|
|
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
|
|
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
|
|
|
## custom FLAGS to work at build-time.
|
|
|
|
## custom FLAGS to work at build-time.
|
|
|
|
|
|
|
|
|
|
|
|
# weaker rule for building files without headers
|
|
|
|
deps: |
|
|
|
obj/%.o : %.cpp |
|
|
|
|
|
|
|
@test -d obj || mkdir obj |
|
|
|
@test -d obj || mkdir obj |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) -MM *.cpp > $(DEPS) |
|
|
|
|
|
|
|
@sed -i -e '/\.o:/ s/^/obj\//' $(DEPS) |
|
|
|
|
|
|
|
|
|
|
|
obj/%.o : %.cpp %.h |
|
|
|
obj/%.o : %.cpp |
|
|
|
@test -d obj || mkdir obj |
|
|
|
@test -d obj || mkdir obj |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
|
|
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# '-' is 'ignore if missing' on first run
|
|
|
|
|
|
|
|
-include $(DEPS) |
|
|
|
|
|
|
|
|
|
|
|
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) |
|
|
|
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) |
|
|
|
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) |
|
|
|
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) |
|
|
|
|
|
|
|
|
|
|
@ -58,8 +62,8 @@ dist: |
|
|
|
git archive --format=tar.gz -9 --worktree-attributes \
|
|
|
|
git archive --format=tar.gz -9 --worktree-attributes \
|
|
|
|
--prefix=i2pd_$(LATEST_TAG)/ $(LATEST_TAG) -o i2pd_$(LATEST_TAG).tar.gz |
|
|
|
--prefix=i2pd_$(LATEST_TAG)/ $(LATEST_TAG) -o i2pd_$(LATEST_TAG).tar.gz |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all |
|
|
|
.PHONY: all |
|
|
|
.PHONY: clean |
|
|
|
.PHONY: clean |
|
|
|
|
|
|
|
.PHONY: deps |
|
|
|
.PHONY: dist |
|
|
|
.PHONY: dist |
|
|
|
.PHONY: api |
|
|
|
.PHONY: api |
|
|
|