📄 makefile.in
字号:
# ``The contents of this file are subject to the Erlang Public License,# Version 1.1, (the "License"); you may not use this file except in# compliance with the License. You should have received a copy of the# Erlang Public License along with this software. If not, it can be# retrieved via the world wide web at http://www.erlang.org/.# # Software distributed under the License is distributed on an "AS IS"# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See# the License for the specific language governing rights and limitations# under the License.# # The Initial Developer of the Original Code is Ericsson Utvecklings AB.# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings# AB. All Rights Reserved.''# # $Id$#include $(ERL_TOP)/make/target.mkinclude $(ERL_TOP)/erts/include/internal/$(TARGET)/ethread.mkUSING_MINGW=@MIXED_CYGWIN_MINGW@USING_VC=@MIXED_CYGWIN_VC@CC=@CC@LD=@LD@AR=@AR@RANLIB=@RANLIB@RM=@RM@MKDIR=@MKDIR@INSTALL=@INSTALL@INSTALL_DIR=@INSTALL_DIR@INSTALL_DATA=@INSTALL_DATA@INSTALL_PROGRAM=@INSTALL_PROGRAM@ifeq ($(TYPE),debug)CFLAGS = @DEBUG_CFLAGS@ -DDEBUGTYPEMARKER=.debugPRE_LD =ifeq ($(TARGET),win32)LDFLAGS += -gendifelseifeq ($(TYPE),purify)CFLAGS = @CFLAGS@ -DPURIFYTYPEMARKER=.purifyPRE_LD = purify $(PURIFY_BUILD_OPTIONS)elseifeq ($(TYPE),quantify)CFLAGS = @CFLAGS@ -DQUANTIFYTYPEMARKER=.quantifyPRE_LD = quantify $(QUANTIFY_BUILD_OPTIONS)elseifeq ($(TYPE),purecov)CFLAGS = @DEBUG_CFLAGS@ -DPURECOVTYPEMARKER=.purecovPRE_LD = purecov $(PURECOV_BUILD_OPTIONS)elseoverride TYPE=optCFLAGS = @CFLAGS@PRE_LD =TYPEMARKER =endifendifendifendififeq ($(findstring -D_GNU_SOURCE,$(CFLAGS)),)THR_DEFS = $(ETHR_DEFS)else# Remove duplicate -D_GNU_SOURCETHR_DEFS = $(filter-out -D_GNU_SOURCE%, $(ETHR_DEFS))endifLIBS=@LIBS@CREATE_DIRS=TT_DIR=$(TARGET)/$(TYPE)BIN_DIR=../bin/$(TARGET)OBJ_DIR=../obj/$(TT_DIR)CREATE_DIRS += $(BIN_DIR) $(OBJ_DIR)PROGS=DRIVERS=## emem sources, objects, includes, libs, etc...#ifneq ($(strip $(ETHR_LIB_NAME)),)# Need ethread package for ememPROGS += $(BIN_DIR)/emem$(TYPEMARKER)@EXEEXT@endifEMEM_OBJ_DIR=$(OBJ_DIR)/ememCREATE_DIRS += $(EMEM_OBJ_DIR)EMEM_INCLUDES = -I$(ERL_TOP)/erts/include \ -I$(ERL_TOP)/erts/include/$(TARGET) \ -I$(ERL_TOP)/erts/include/internal \ -I$(ERL_TOP)/erts/include/internal/$(TARGET)EMEM_HEADERS = erl_memory_trace_block_table.hEMEM_SRCS = erl_memory.c erl_memory_trace_block_table.cEMEM_CFLAGS = $(THR_DEFS) $(subst O2,O3, $(CFLAGS)) $(EMEM_INCLUDES)EMEM_LDFLAGS = $(LDFLAGS)ifeq ($(USING_VC), yes)ifeq ($(TYPE),debug)MT_LIB=MDdelseMT_LIB=MDendifEMEM_CFLAGS += -$(MT_LIB)EMEM_LDFLAGS += -$(MT_LIB)EMEM_ERTS_LIB=erts_$(MT_LIB)$(TYPEMARKER)elseEMEM_ERTS_LIB=erts_r$(TYPEMARKER)endifEMEM_LIBS = $(LIBS) \ -L$(ERL_TOP)/erts/lib/$(TARGET) \ -L$(ERL_TOP)/erts/lib/internal/$(TARGET) \ -l$(EMEM_ERTS_LIB) \ -l$(ETHR_LIB_NAME)$(TYPEMARKER) \ $(ETHR_X_LIBS)EMEM_OBJS = $(addprefix $(EMEM_OBJ_DIR)/,$(notdir $(EMEM_SRCS:.c=.o)))## Misc targets#all: $(CREATE_DIRS) erts_lib $(PROGS) $(DRIVERS)erts_lib: cd $(ERL_TOP)/erts/lib_src && $(MAKE) $(TYPE)docs:clean: $(RM) -rf ../obj/* $(RM) -rf ../bin/* $(RM) -f ./*~.PHONY: all erts_lib docs clean## Make dir targets#$(CREATE_DIRS): $(MKDIR) -p $@## Object targets#$(EMEM_OBJ_DIR)/%.o: %.c $(CC) $(EMEM_CFLAGS) -o $@ -c $<## Driver targets### Program targets#$(BIN_DIR)/emem$(TYPEMARKER)@EXEEXT@: $(EMEM_OBJS) $(PRE_LD) $(LD) $(EMEM_LDFLAGS) -o $@ $(EMEM_OBJS) $(EMEM_LIBS)## Release targets#include $(ERL_TOP)/make/otp_release_targets.mkinclude ../vsn.mkRELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)release_spec: all $(INSTALL_DIR) $(RELSYSDIR)/c_src $(INSTALL_DATA) $(EMEM_SRCS) $(EMEM_HEADERS) $(RELSYSDIR)/c_srcifneq ($(PROGS),) $(INSTALL_DIR) $(RELSYSDIR)/bin $(INSTALL_PROGRAM) $(PROGS) $(RELSYSDIR)/binendifrelease_docs_spec:.PHONY: release_spec release_docs_spec## Make dependencies#ifeq ($(USING_VC), yes)DEP_CC=@EMU_CC@elseDEP_CC=$(CC)endifSED_REPL_EMEM_OBJ_DIR=s|^\([^:]*\)\.o:|$$(EMEM_OBJ_DIR)/\1.o:|gSED_REPL_OBJ_DIR=s|^\([^:]*\)\.o:|$$(OBJ_DIR)/\1.o:|gSED_REPL_TT_DIR=s|$(TT_DIR)/|$$(TT_DIR)/|gSED_REPL_TARGET=s|$(TARGET)/|$$(TARGET)/|gSED_REPL_ERL_TOP=s|$(ERL_TOP)/|$$(ERL_TOP)/|gSED_EMEM_DEPEND=sed '$(SED_REPL_EMEM_OBJ_DIR);$(SED_REPL_TT_DIR);$(SED_REPL_TARGET);$(SED_REPL_ERL_TOP)'SED_DEPEND=sed '$(SED_REPL_OBJ_DIR);$(SED_REPL_TT_DIR);$(SED_REPL_TARGET);$(SED_REPL_ERL_TOP)'DEPEND_MK=depend.mkdep depend: @echo "Generating dependency file $(DEPEND_MK)..." @echo "# Generated dependency rules." > $(DEPEND_MK); @echo "# Do *not* edit this file; instead, run 'make depend'." \ >> $(DEPEND_MK); @echo "# " >> $(DEPEND_MK); @echo "# emem objects..." >> $(DEPEND_MK); $(DEP_CC) -MM $(EMEM_CFLAGS) $(EMEM_SRCS) \ | $(SED_EMEM_DEPEND) >> $(DEPEND_MK) @echo "# EOF" >> $(DEPEND_MK);.PHONY: dep dependinclude $(DEPEND_MK)# eof
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -