makefile

来自「OTP是开放电信平台的简称」· 代码 · 共 182 行

TXT
182
字号
# ``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)/make/$(TARGET)/otp.mk# ----------------------------------------------------# Application version# ----------------------------------------------------include ../vsn.mkVSN = $(SNMP_VSN)# ----------------------------------------------------# Configured variables# ----------------------------------------------------PERL = perl# ----------------------------------------------------# Release directory specification# ----------------------------------------------------RELSYSDIR = $(RELEASE_PATH)/lib/snmp-$(VSN)# ----------------------------------------------------# Common macros# ----------------------------------------------------# NOTE: # 1) Order is important; some MIBs include others# 2) The OTP-REG mib actually belongs to another#    application (otp_mibs), and is exported by this#    app. But since that app is built later, we have #    to built it here in order to be able to build #    OTP-SNMPEA-MIB (that needs otpModules and#    otpApplications).MIBS_A = \	RFC1213-MIB \	STANDARD-MIB \	SNMPv2-TM \	SNMPv2-MIB \	SNMP-FRAMEWORK-MIB \	SNMP-MPD-MIB \	SNMP-TARGET-MIB \	SNMP-NOTIFICATION-MIB \	SNMP-COMMUNITY-MIB \	SNMP-USER-BASED-SM-MIB \	SNMP-VIEW-BASED-ACM-MIB \	SNMP-USM-AES-MIB \	INET-ADDRESS-MIBMIBS_B = OTP-SNMPEA-MIBBUILD_MIBS = \	$(MIBS_A) \	OTP-REG \	$(MIBS_B)MIBS = $(MIBS_A) $(MIBS_B)STD_v1_MIB_FILES = \	RFC1155-SMI.mib \	RFC-1212.mib \	RFC-1215.mibSTD_v2_MIB_FILES = \	SNMPv2-SMI.mib \	SNMPv2-TC.mib \	SNMPv2-CONF.mib FUNCS_FILES = \	STANDARD-MIB.funcs \	SNMPv2-MIB.funcs \	SNMP-NOTIFICATION-MIB.funcs \	SNMP-TARGET-MIB.funcsV1_MIB_FILES = v1/OTP-SNMPEA-MIB.mib.v1MIB_FILES   = $(MIBS:%=%.mib)BIN_TARGETS = $(MIBS:%=$(SNMP_BIN_TARGET_DIR)/%.bin)HRL_TARGETS = $(MIBS:%=$(SNMP_HRL_TARGET_DIR)/%.hrl)HRL_FILES = $(SNMP_HRL_TARGET_DIR)/SNMPv2-TC.hrl \            $(HRL_TARGETS)TARGET_FILES = \	$(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 \	$(BUILD_MIBS:%=$(SNMP_BIN_TARGET_DIR)/%.bin) \	$(HRL_TARGETS)  \	$(V1_MIB_FILES)# ----------------------------------------------------# FLAGS# ----------------------------------------------------SNMP_FLAGS += -pa ../ebin +version ifneq ($(MIBS_VERBOSITY),) SNMP_FLAGS += +'{verbosity,$(MIBS_VERBOSITY)}'endif# ----------------------------------------------------# Targets# ----------------------------------------------------OTP_MIBDIR = $(shell if test -d ../../otp_mibs; then echo otp_mibs; \		      else echo sasl; fi)debug opt: $(TARGET_FILES)$(ERL_TOP)/lib/snmp/bin/snmp-v2tov1: $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1.src	$(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@	chmod 755 $@$(SNMP_BIN_TARGET_DIR)/OTP-REG.bin:	$(ERL_TOP)/lib/$(OTP_MIBDIR)/mibs/OTP-REG.mib	$(ERLC) -pa $(SNMP_TOOLKIT)/ebin -I $(SNMP_TOOLKIT)/priv/mibs $(SNMP_FLAGS) -o $(SNMP_BIN_TARGET_DIR) $<clean:	rm -f $(TARGET_FILES)docs:conf:	cd ..; $(MAKE) confinfo:	@echo "MIBS            = $(MIBS)"	@echo ""	@echo "BUILD_MIBS      = $(BUILD_MIBS)"	@echo ""	@echo "MIB_FILES       = $(MIB_FILES)"	@echo ""	@echo "BIN_TARGETS     = $(BIN_TARGETS)"	@echo ""	@echo "HRL_TARGETS     = $(HRL_TARGETS)"	@echo ""	@echo "TARGET_FILES = $(TARGET_FILES)"	@echo ""	@echo "OTP_MIBDIR   = $(OTP_MIBDIR)"	@echo ""	@echo "SNMP_VSN    = $(SNMP_VSN)"	@echo "VSN         = $(VSN)"	@echo "RELSYSDIR   = $(RELSYSDIR)"v1/%.mib.v1: %.mib	$(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 -o $@ $<# ----------------------------------------------------# Release Target# ---------------------------------------------------- include $(ERL_TOP)/make/otp_release_targets.mkrelease_spec: opt	$(INSTALL_DIR) $(RELSYSDIR)/mibs	$(INSTALL_DIR) $(RELSYSDIR)/mibs/v1	$(INSTALL_DATA) $(MIB_FILES) $(RELSYSDIR)/mibs	$(INSTALL_DATA) $(STD_v2_MIB_FILES) $(RELSYSDIR)/mibs	$(INSTALL_DATA) $(FUNCS_FILES) $(RELSYSDIR)/mibs	$(INSTALL_DATA) $(STD_v1_MIB_FILES) $(RELSYSDIR)/mibs/v1	$(INSTALL_DATA) $(V1_MIB_FILES) $(RELSYSDIR)/mibs/v1	$(INSTALL_DIR) $(RELSYSDIR)/include	$(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/include	$(INSTALL_DIR) $(RELSYSDIR)/priv/mibs	$(INSTALL_DATA) $(BIN_TARGETS) $(RELSYSDIR)/priv/mibsrelease_docs_spec:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?