Ouss4 commented on a change in pull request #566: URL: https://github.com/apache/incubator-nuttx-apps/pull/566#discussion_r559987690
########## File path: crypto/mbedtls/Makefile ########## @@ -0,0 +1,68 @@ +############################################################################ +# apps/crypto/mbedtls/Makefile +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +include $(APPDIR)/Make.defs + +# Mbed TLS crypto library + +MBEDTLS_DIR = . +MBEDTLS_DIR_NAME = mbedtls + +# Set up build configuration and environment + +WD := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'} + +MBEDTLS_URL ?= "https://github.com/ARMmbed/mbedtls/archive" + +MBEDTLS_VERSION = $(patsubst "%",%,$(strip $(CONFIG_MBEDTLS_VERSION))) +MBEDTLS_ZIP = v$(MBEDTLS_VERSION).zip + +MBEDTLS_UNPACKNAME = mbedtls +UNPACK ?= unzip -q -o + +MBEDTLS_UNPACKDIR = $(WD)$(DELIM)$(MBEDTLS_UNPACKNAME) +MBEDTLS_UNPACKLIBDIR = $(MBEDTLS_UNPACKDIR)$(DELIM)library + +# This lets Mbed TLS better use some of the POSIX features we have +CFLAGS += -D__unix__ +CFLAGS += -I$(MBEDTLS_UNPACKDIR)$(DELIM)include + +MBEDTLS_LIB_CSRCS := $(addprefix $(MBEDTLS_UNPACKLIBDIR)$(DELIM), $(notdir $(wildcard $(MBEDTLS_UNPACKLIBDIR)$(DELIM)*.c))) + +CSRCS += $(MBEDTLS_LIB_CSRCS) + + +$(MBEDTLS_ZIP): + @echo "Downloading: $(MBEDTLS_URL)$(DELIM)$(MBEDTLS_ZIP)" + $(Q) curl -O -L $(MBEDTLS_URL)$(DELIM)$(MBEDTLS_ZIP) + +$(MBEDTLS_UNPACKNAME): $(MBEDTLS_ZIP) + @echo "Unpacking: $(MBEDTLS_ZIP) -> $(MBEDTLS_UNPACKNAME)" + $(Q) $(UNPACK) $(MBEDTLS_ZIP) + $(Q) mv mbedtls-$(MBEDTLS_VERSION) $(MBEDTLS_UNPACKNAME) + $(Q) touch $(MBEDTLS_UNPACKNAME) Review comment: I think we still need it. If you remember we talked about it before, and depending on the `mv` implementation and the underlying file system, `mv` may or may not change the timestamps. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org