walnux/crypto/Makefile
Luchian Mihai 7335b36eca
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Docker-Linux / push (push) Has been cancelled
walnux: moveout
2025-11-04 19:15:10 +02:00

106 lines
No EOL
2.6 KiB
Makefile

############################################################################
# crypto/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# 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.
#
############################################################################
# Basic
CSRCS += crypto.c testmngr.c
# cryptodev support
ifeq ($(CONFIG_CRYPTO_CRYPTODEV),y)
CSRCS += cryptodev.c
ifeq ($(CONFIG_CRYPTO_CRYPTODEV_SOFTWARE),y)
CSRCS += cryptosoft.c
CSRCS += xform.c
endif
endif
# Software crypto algorithm
ifeq ($(CONFIG_CRYPTO_SW_AES),y)
CSRCS += aes.c
endif
CSRCS += blake2s.c
CSRCS += blf.c
CSRCS += cast.c
CSRCS += chachapoly.c
CSRCS += ecb_enc.c
CSRCS += ecb3_enc.c
CSRCS += set_key.c
CSRCS += md5.c
CSRCS += poly1305.c
CSRCS += rijndael.c
CSRCS += rmd160.c
CSRCS += sha1.c
CSRCS += sha2.c
CSRCS += gmac.c
CSRCS += cmac.c
CSRCS += hmac.c
ifeq ($(CONFIG_CRYPTO_RANDOM_POOL),y)
CSRCS += idgen.c
CSRCS += curve25519.c
endif
CSRCS += key_wrap.c
CSRCS += siphash.c
CSRCS += hmac_buff.c
CSRCS += bn.c
# Entropy pool random number generator
ifeq ($(CONFIG_CRYPTO_RANDOM_POOL),y)
CSRCS += random_pool.c
endif
AOBJS = $(ASRCS:.S=.o)
ABJS := $(addprefix ${NXOUT}/, $(AOBJS))
COBJS = $(CSRCS:.c=.o)
COBJS := $(addprefix ${NXOUT}/, $(COBJS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
BIN = libcrypto.a
$(AOBJS): ${NXOUT}/%.o: %.S
$(call ASSEMBLE, $<, $@)
$(COBJS): ${NXOUT}/%.o: %.c
$(call COMPILE, $<, $@)
symlink:
$(call LINK, ${ARCH_DIR}/include, ${NXBASE}/include/arch)
$(call LINK, ${NXBASE}/soc/arm/include/${ARCH_CHIP}, ${NXBASE}/include/chip)
$(call LINK, ${NXOUT}/config.h, ${NXBASE}/include/nuttx/config.h)
unlink:
$(call UNLINK, ${NXBASE}/include/arch)
$(call UNLINK, ${NXBASE}/include/chip)
$(call UNLINK, ${NXBASE}/include/nuttx/config.h)
${BIN} : ${OBJS}
$(call ARCHIVE, ${NXOUT}/$@, $^)
.PHONY: symlink unlink all
.IGNORE: $(BIN)
all: symlink $(BIN) unlink