1# 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 1999-2018. All Rights Reserved. 5# 6# Licensed under the Apache License, Version 2.0 (the "License"); 7# you may not use this file except in compliance with the License. 8# You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, software 13# distributed under the License is distributed on an "AS IS" BASIS, 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15# See the License for the specific language governing permissions and 16# limitations under the License. 17# 18# %CopyrightEnd% 19# 20include $(ERL_TOP)/make/target.mk 21include $(ERL_TOP)/make/$(TARGET)/otp.mk 22 23# ---------------------------------------------------- 24# Application version 25# ---------------------------------------------------- 26include ../vsn.mk 27VSN=$(CRYPTO_VSN) 28 29# ---------------------------------------------------- 30# Release directory specification 31# ---------------------------------------------------- 32RELSYSDIR = $(RELEASE_PATH)/lib/crypto-$(VSN) 33 34# ---------------------------------------------------- 35# Common Macros 36# ---------------------------------------------------- 37 38MODULES= \ 39 crypto \ 40 crypto_ec_curves 41 42HRL_FILES= 43ERL_FILES= $(MODULES:%=%.erl) 44 45TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) 46 47APP_FILE= crypto.app 48APPUP_FILE= crypto.appup 49 50APP_SRC= $(APP_FILE).src 51APP_TARGET= $(EBIN)/$(APP_FILE) 52APPUP_SRC= $(APPUP_FILE).src 53APPUP_TARGET= $(EBIN)/$(APPUP_FILE) 54 55# ---------------------------------------------------- 56# FLAGS 57# ---------------------------------------------------- 58ERL_COMPILE_FLAGS += -DCRYPTO_VSN=\"$(VSN)\" -Werror -I../include 59 60# ---------------------------------------------------- 61# Targets 62# ---------------------------------------------------- 63 64debug opt valgrind: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) 65 66clean: 67 rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) 68 rm -f errs core *~ 69 70$(APP_TARGET): $(APP_SRC) ../vsn.mk 71 $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ 72 73$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk 74 $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ 75 76docs: 77 78# ---------------------------------------------------- 79# Release Target 80# ---------------------------------------------------- 81include $(ERL_TOP)/make/otp_release_targets.mk 82 83release_spec: opt 84 $(INSTALL_DIR) "$(RELSYSDIR)/src" 85 $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" 86 $(INSTALL_DIR) "$(RELSYSDIR)/ebin" 87 $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) \ 88 $(APPUP_TARGET) "$(RELSYSDIR)/ebin" 89 90release_docs_spec: 91