1# Copyright 2017-2018 Oticon A/S 2# SPDX-License-Identifier: Apache-2.0 3 4# makefile for building and running a quick test the library 5 6SRCS:=blecrypt.c 7OBJS:=${SRCS:.c=.o} 8TEST_SRCS:=blecrypt_unittest.c 9TEST_EXE:=./blecrypt_unittest 10INCLUDES:=-I../include/ 11 12LIBS:= ../libcrypto.a \ 13 -ldl 14 15CC:=gcc 16WARNINGS:=-Wall -pedantic 17CFLAGS:= ${WARNINGS} -std=c99 -m32 18 19all: compile 20 21compile: ${OBJS} 22 23%.o: %.c 24 @${CC} ${CFLAGS} ${INCLUDES} -c $< -o $@ 25 26test: ${TEST_SRCS} ${OBJS} 27 @${CC} ${CFLAGS} ${TEST_SRCS} ${OBJS} ${LIBS} -o ${TEST_EXE} 28 @-${TEST_EXE} 29 @-rm -f ${TEST_EXE} 30 31clean: 32 @-rm -f ${TEST_EXE} ${OBJS} 33 34install: 35