makefile
来自「torch tracking code, it is a good code」· 代码 · 共 43 行
TXT
43 行
# get user and architecture specific optionsOS := $(shell uname -s)TORCHDIR := $(shell cd ../../..; pwd)include ../../../Makefile_options_$(OS)CC_FILES := $(wildcard *.cc)OBJS := $(foreach f,$(CC_FILES),$(OBJS_DIR)/$(patsubst %.cc,%.o,$(f)))all: $(LIBTORCH)$(LIBTORCH): $(OBJS) @echo "Archiving..." @$(AR) $(LIBTORCH) $(OBJS)$(OBJS_DIR)/%.o: %.cc @echo $< @$(CC) $(CFLAGS_$(MODE)) $(INCS) -o $@ -c $<distclean: @\rm -f .deps_*clean: @echo "Remove objects file and dependencies..." @\rm -Rf $(OBJS) $(LIBTORCH) @\rm -f .deps_$(VERSION_KEY)depend: @echo "Tracking dependencies..." @\rm -f .deps_$(VERSION_KEY) @for file in *.cc ; do printf "$(OBJS_DIR)/" >> .deps_$(VERSION_KEY); $(DEP) $(CFLAGS_$(MODE)) $(INCS) $$file >> .deps_$(VERSION_KEY); done.deps_$(VERSION_KEY): @echo ">>> Please do a 'make depend' <<<" exit 10ifneq ($(MAKECMDGOALS),distclean)ifneq ($(MAKECMDGOALS),clean)ifneq ($(MAKECMDGOALS),depend)include .deps_$(VERSION_KEY)endifendifendif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?