Add init script
This commit is contained in:
63
Makefile
63
Makefile
@@ -2,13 +2,18 @@ include CommonDefs.mk
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help apidoc
|
||||
|
||||
help:
|
||||
@echo "Usage:"
|
||||
@echo " make help show help message"
|
||||
@echo " make apidoc make api doc"
|
||||
@echo " make opendoc open api doc (html)"
|
||||
@echo " make help show help message"
|
||||
@echo " make apidoc make api doc"
|
||||
@echo " make opendoc open api doc (html)"
|
||||
@echo " make init init project"
|
||||
@echo " make test build test and run"
|
||||
@echo " make clean|cleanall clean generated or useless things"
|
||||
|
||||
.PHONY: help
|
||||
|
||||
# doc
|
||||
|
||||
apidoc:
|
||||
@$(call echo,Make $@)
|
||||
@@ -22,6 +27,52 @@ opendoc: apidoc
|
||||
[ -f "$$html" ] && sh ./scripts/open.sh $$html; \
|
||||
done
|
||||
|
||||
.PHONY: apidoc opendoc
|
||||
|
||||
# init
|
||||
|
||||
init:
|
||||
@$(call echo,Make $@)
|
||||
@sh ./scripts/init.sh
|
||||
|
||||
.PHONY: init
|
||||
|
||||
# deps
|
||||
|
||||
submodules:
|
||||
@git submodule update --init
|
||||
|
||||
third_party: submodules
|
||||
@$(call echo,Make $@)
|
||||
@$(call echo,Make glog,33)
|
||||
@$(call cmake_build,./third_party/glog/_build)
|
||||
|
||||
.PHONY: submodules third_party
|
||||
|
||||
# test
|
||||
|
||||
test: submodules
|
||||
@$(call echo,Make $@)
|
||||
@$(call echo,Make gtest,33)
|
||||
@$(call cmake_build,./tests/gtest/_build)
|
||||
|
||||
.PHONY: test
|
||||
|
||||
# clean
|
||||
|
||||
clean:
|
||||
@$(call echo,Make $@)
|
||||
@$(call rm,./tests/gtest/_build/)
|
||||
@$(call rm,./third_party/glog/_build/)
|
||||
|
||||
cleanall: clean
|
||||
@$(call rm,./doc/output/)
|
||||
@$(FIND) . -type f -name ".DS_Store" -print0 | xargs -0 rm -f
|
||||
|
||||
.PHONY: clean cleanall
|
||||
|
||||
# others
|
||||
|
||||
host:
|
||||
@$(call echo,Make $@)
|
||||
@echo HOST_OS: $(HOST_OS)
|
||||
@@ -35,3 +86,5 @@ host:
|
||||
@echo LDD: $(LDD)
|
||||
@echo CMAKE: $(CMAKE)
|
||||
@#$(FIND) . -name READ*
|
||||
|
||||
.PHONY: host
|
||||
|
||||
Reference in New Issue
Block a user