summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-08-08 20:16:07 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-10-18 19:08:32 +0200
commit387a45923c2ea6b223584815c7cd796ae064e22e (patch)
tree5615e48952d58e103dff739b085a057aecda473f
parentcaa9d9c1c5cc4347edca0c9a9868fdd105b5e779 (diff)
downloadrockbox-387a45923c2ea6b223584815c7cd796ae064e22e.tar.gz
rockbox-387a45923c2ea6b223584815c7cd796ae064e22e.zip
utils: Add Makefile for our copy of libtomcrypt.
Change-Id: I6b9ffe86b9e78b494a3a9211d6e79bb81c9fb6d4
-rw-r--r--utils/tomcrypt/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/utils/tomcrypt/Makefile b/utils/tomcrypt/Makefile
new file mode 100644
index 0000000000..ce0f9bae47
--- /dev/null
+++ b/utils/tomcrypt/Makefile
@@ -0,0 +1,41 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7
8BUILD_DIR := build
9TARGET_DIR := .
10DEFINES =
11CC ?= gcc
12ifndef V
13 SILENT := @
14endif
15
16CFLAGS := -O3 -g -std=c99 -Wall $(DEFINES) -Isrc/headers
17LDFLAGS :=
18
19SOURCES := \
20 src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c \
21 src/misc/crypt/crypt_argchk.c src/misc/crypt/crypt_register_cipher.c src/misc/crypt/crypt_cipher_is_valid.c src/misc/crypt/crypt_cipher_descriptor.c \
22 src/misc/zeromem.c src/misc/compare_testvector.c \
23 src/modes/cbc/cbc_start.c src/modes/cbc/cbc_decrypt.c src/modes/cbc/cbc_encrypt.c \
24 src/hashes/sha1.c
25
26
27OBJS := $(addprefix $(BUILD_DIR)/,$(patsubst %.c,%.o,$(SOURCES)))
28
29LIB := librbtomcrypt.a
30
31$(LIB): $(OBJS)
32 $(info AR $(notdir $@))
33 $(SILENT)$(CROSS)$(AR) rcs $(TARGET_DIR)/$@ $^
34
35$(BUILD_DIR)/%.o: %.c
36 $(info CC $(notdir $@))
37 $(SILENT)mkdir -p $(dir $@)
38 $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
39
40clean:
41 rm -fr $(BUILDDIR) $(LIB)