Initial commit
This commit is contained in:
commit
34b960b774
40 changed files with 12878 additions and 0 deletions
46
source/mbedtls/lib/Makefile
Normal file
46
source/mbedtls/lib/Makefile
Normal file
|
@ -0,0 +1,46 @@
|
|||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
|
||||
endif
|
||||
|
||||
TOPDIR ?= $(CURDIR)
|
||||
include $(DEVKITPRO)/libnx/switch_rules
|
||||
|
||||
# Also see "include/mbedtls/config.h"
|
||||
|
||||
ARCH := -march=armv8-a+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||
CFLAGS := -g -Wall -O3 -ffunction-sections $(ARCH) $(DEFINES)
|
||||
CFLAGS += -I ../include -D__SWITCH__
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS ?= -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
|
||||
OBJS_CRYPTO= aes.o cipher.o cipher_wrap.o \
|
||||
cmac.o platform_util.o
|
||||
|
||||
.SILENT:
|
||||
|
||||
.PHONY: all static clean
|
||||
|
||||
all: static
|
||||
|
||||
static: libmbedcrypto.a
|
||||
|
||||
# crypto
|
||||
libmbedcrypto.a: $(OBJS_CRYPTO)
|
||||
echo " AR $@"
|
||||
$(AR) -rc $@ $(OBJS_CRYPTO)
|
||||
echo " RL $@"
|
||||
$(AR) -s $@
|
||||
|
||||
|
||||
.c.o:
|
||||
echo " CC $<"
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -c $<
|
||||
|
||||
clean:
|
||||
rm -f *.o libmbed*
|
Loading…
Add table
Add a link
Reference in a new issue