Files
mmc-utils/Makefile
T
Roman Peniaev 35c31feacf mmc-utils: RPMB: add HMAC SHA256 support
RPMB requires digital signature of the message.  Take the implementation
of HMAC SHA256 from this place https://github.com/ogay/hmac.git

Actually this is BSD license, IANAL but according to my understanding
nothing terrible will happen if we provide all the original copyrights.

Signed-off-by: Roman Pen <r.peniaev@gmail.com>
Cc: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <chris@printf.net>
2014-08-12 10:29:37 -04:00

55 lines
961 B
Makefile

CC ?= gcc
AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
CFLAGS ?= -g -O2
objects = \
mmc.o \
mmc_cmds.o \
3rdparty/hmac_sha/hmac_sha2.o \
3rdparty/hmac_sha/sha2.o
CHECKFLAGS = -Wall -Werror -Wuninitialized -Wundef
DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
override CFLAGS := $(CHECKFLAGS) $(AM_CFLAGS) $(CFLAGS)
INSTALL = install
prefix ?= /usr/local
bindir = $(prefix)/bin
LIBS=
RESTORE_LIBS=
progs = mmc
# make C=1 to enable sparse
ifdef C
check = sparse $(CHECKFLAGS)
endif
all: $(progs) manpages
.c.o:
ifdef C
$(check) $<
endif
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
mmc: $(objects)
$(CC) $(CFLAGS) -o $@ $(objects) $(LDFLAGS) $(LIBS)
manpages:
$(MAKE) -C man
install-man:
$(MAKE) -C man install
clean:
rm -f $(progs) $(objects)
$(MAKE) -C man clean
install: $(progs) install-man
$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
$(INSTALL) $(progs) $(DESTDIR)$(bindir)
.PHONY: all clean install manpages install-man