mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Vboot Reference: Misc style fixes to Makefile and fix testing script.
Review URL: http://codereview.chromium.org/600114
This commit is contained in:
10
Makefile
10
Makefile
@@ -2,11 +2,11 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
export CC=gcc
|
export CC = gcc
|
||||||
export CFLAGS=-Wall -ansi
|
export CFLAGS = -Wall -ansi -DNDEBUG
|
||||||
export TOP=$(shell pwd)
|
export TOP = $(shell pwd)
|
||||||
export INCLUDEDIR=$(TOP)/include
|
export INCLUDEDIR = $(TOP)/include
|
||||||
export INCLUDES=-I$(INCLUDEDIR)
|
export INCLUDES = -I$(INCLUDEDIR)
|
||||||
|
|
||||||
SUBDIRS=common crypto utils tests
|
SUBDIRS=common crypto utils tests
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
SRCS=utility_stub.c
|
SRCS = utility_stub.c
|
||||||
OBJS=$(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
all: libcommon.a
|
all: libcommon.a
|
||||||
|
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
SRCS=rsa.c sha1.c sha2.c padding.c rsa_utility.c sha_utility.c
|
SRCS = rsa.c sha1.c sha2.c padding.c rsa_utility.c sha_utility.c
|
||||||
OBJS=$(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
all: libcrypto.a
|
all: libcrypto.a
|
||||||
|
|
||||||
libcrypto.a: $(OBJS)
|
libcrypto.a: $(OBJS)
|
||||||
ar rs libcrypto.a $(OBJS)
|
ar rs libcrypto.a $(OBJS)
|
||||||
|
|
||||||
padding.c: genpadding.sh
|
padding.c: genpadding.sh
|
||||||
./genpadding.sh >$@
|
./genpadding.sh >$@
|
||||||
|
|
||||||
.c.o: $(OBJS)
|
.c.o: $(OBJS)
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall -DNDEBUG
|
||||||
INCLUDES ?= -I../include/
|
INCLUDES ?= -I../include/
|
||||||
TOP ?= ../
|
TOP ?= ../
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ firmware_image_tests: firmware_image_tests.c
|
|||||||
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS)
|
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS)
|
||||||
|
|
||||||
sha_benchmark: sha_benchmark.c timer_utils.c
|
sha_benchmark: sha_benchmark.c timer_utils.c
|
||||||
$(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $^ -o $@ $(LIBS)
|
$(CC) $(CFLAGS) $(INCLUDES) $^ -o $@ $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f sha_tests sha_benchmark firmware_image_tests
|
rm -f sha_tests sha_benchmark firmware_image_tests
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ function pre_work {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
rm ${TEST_FILE} ${TEST_FILE}.*.sig
|
rm ${SCRIPT_DIR}/${TEST_FILE} ${SCRIPT_DIR}/${TEST_FILE}.*.sig
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine script directory.
|
# Determine script directory.
|
||||||
@@ -87,6 +87,7 @@ else
|
|||||||
fi
|
fi
|
||||||
UTIL_DIR=`dirname ${SCRIPT_DIR}`/utils
|
UTIL_DIR=`dirname ${SCRIPT_DIR}`/utils
|
||||||
KEY_DIR=${SCRIPT_DIR}/testkeys
|
KEY_DIR=${SCRIPT_DIR}/testkeys
|
||||||
|
TEST_DIR=${SCRIPT_DIR}/
|
||||||
|
|
||||||
echo "Generating test cases..."
|
echo "Generating test cases..."
|
||||||
pre_work
|
pre_work
|
||||||
@@ -101,7 +102,7 @@ test_verification
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Cleaning up..."
|
echo "Cleaning up..."
|
||||||
#cleanup
|
cleanup
|
||||||
|
|
||||||
exit $return_code
|
exit $return_code
|
||||||
|
|
||||||
|
|||||||
@@ -3,33 +3,33 @@
|
|||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CFLAGS=-Wall -ggdb
|
CFLAGS = -Wall -ggdb -DNDEBUG
|
||||||
INCLUDES ?= -I../include/
|
INCLUDES ?= -I../include/
|
||||||
TOP ?= ../
|
TOP ?= ../
|
||||||
|
|
||||||
|
LIBS = -lcrypto
|
||||||
|
FIRMWARELIBS = $(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a
|
||||||
|
|
||||||
LIBS=-lcrypto
|
all: dumpRSAPublicKey verify_data signature_digest firmware_utility
|
||||||
FIRMWARELIBS=$(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a
|
|
||||||
|
|
||||||
all: dumpRSAPublicKey verify_data signature_digest firmware_utility
|
dumpRSAPublicKey: dumpRSAPublicKey.c
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) $< -o $@
|
||||||
|
|
||||||
dumpRSAPublicKey: dumpRSAPublicKey.c
|
verify_data: verify_data.c file_keys.o
|
||||||
$(CC) $(CFLAGS) $(LIBS) $< -o $@
|
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ file_keys.o $(FIRMWARELIBS)
|
||||||
|
|
||||||
verify_data: verify_data.c file_keys.o
|
signature_digest: signature_digest.c
|
||||||
$(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $< -o $@ file_keys.o $(FIRMWARELIBS)
|
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(FIRMWARELIBS)
|
||||||
|
|
||||||
signature_digest: signature_digest.c
|
firmware_utility: firmware_utility.c firmware_image.o file_keys.o
|
||||||
$(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $< -o $@ $(FIRMWARELIBS)
|
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ firmware_image.o $(FIRMWARELIBS)
|
||||||
|
|
||||||
firmware_utility: firmware_utility.c firmware_image.o file_keys.o
|
file_keys.o: file_keys.c
|
||||||
$(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $< -o $@ firmware_image.o $(FIRMWARELIBS)
|
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
|
||||||
file_keys.o: file_keys.c
|
firmware_image.o: firmware_image.c
|
||||||
$(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) -c $< -o $@
|
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
|
||||||
firmware_image.o: firmware_image.c
|
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
|
||||||
clean:
|
clean:
|
||||||
rm -f dumpRSAPublicKey verify_data signature_digest firmware_image.o file_keys.o
|
rm -f dumpRSAPublicKey verify_data signature_digest firmware_image.o file_keys.o
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user