diff options
author | Gaurav Shah <gauravsh@google.com> | 2010-02-16 19:04:11 -0800 |
---|---|---|
committer | Gaurav Shah <gauravsh@google.com> | 2010-02-16 19:04:11 -0800 |
commit | 7ca31f3e4d21bb7dfa39e1e4b9ab42c7047e66d8 (patch) | |
tree | 4e6a101231e65a7cdb1d33b15c72c9ea3105c6e7 | |
parent | 431b98886ed80b46e404d7288362f8dcdfa9ace3 (diff) | |
download | vboot-7ca31f3e4d21bb7dfa39e1e4b9ab42c7047e66d8.tar.gz |
Vboot Reference: Misc style fixes to Makefile and fix testing script.
Review URL: http://codereview.chromium.org/600114
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | common/Makefile | 4 | ||||
-rw-r--r-- | crypto/Makefile | 12 | ||||
-rw-r--r-- | tests/Makefile | 4 | ||||
-rwxr-xr-x | tests/run_rsa_tests.sh | 5 | ||||
-rw-r--r-- | utils/Makefile | 32 |
6 files changed, 34 insertions, 33 deletions
@@ -2,11 +2,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -export CC=gcc -export CFLAGS=-Wall -ansi -export TOP=$(shell pwd) -export INCLUDEDIR=$(TOP)/include -export INCLUDES=-I$(INCLUDEDIR) +export CC = gcc +export CFLAGS = -Wall -ansi -DNDEBUG +export TOP = $(shell pwd) +export INCLUDEDIR = $(TOP)/include +export INCLUDES = -I$(INCLUDEDIR) SUBDIRS=common crypto utils tests diff --git a/common/Makefile b/common/Makefile index 51d482e2..fc73ec23 100644 --- a/common/Makefile +++ b/common/Makefile @@ -2,8 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -SRCS=utility_stub.c -OBJS=$(SRCS:.c=.o) +SRCS = utility_stub.c +OBJS = $(SRCS:.c=.o) all: libcommon.a diff --git a/crypto/Makefile b/crypto/Makefile index b6d654f4..92b2689a 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -2,18 +2,18 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -SRCS=rsa.c sha1.c sha2.c padding.c rsa_utility.c sha_utility.c -OBJS=$(SRCS:.c=.o) +SRCS = rsa.c sha1.c sha2.c padding.c rsa_utility.c sha_utility.c +OBJS = $(SRCS:.c=.o) -all: libcrypto.a +all: libcrypto.a -libcrypto.a: $(OBJS) +libcrypto.a: $(OBJS) ar rs libcrypto.a $(OBJS) -padding.c: genpadding.sh +padding.c: genpadding.sh ./genpadding.sh >$@ -.c.o: $(OBJS) +.c.o: $(OBJS) $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ clean: diff --git a/tests/Makefile b/tests/Makefile index 4801dc5b..5d4faf98 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,7 +3,7 @@ # found in the LICENSE file. CC ?= gcc -CFLAGS = -Wall +CFLAGS = -Wall -DNDEBUG INCLUDES ?= -I../include/ TOP ?= ../ @@ -19,7 +19,7 @@ firmware_image_tests: firmware_image_tests.c $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) sha_benchmark: sha_benchmark.c timer_utils.c - $(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $^ -o $@ $(LIBS) + $(CC) $(CFLAGS) $(INCLUDES) $^ -o $@ $(LIBS) clean: rm -f sha_tests sha_benchmark firmware_image_tests diff --git a/tests/run_rsa_tests.sh b/tests/run_rsa_tests.sh index d56f5a08..20384836 100755 --- a/tests/run_rsa_tests.sh +++ b/tests/run_rsa_tests.sh @@ -72,7 +72,7 @@ function pre_work { } function cleanup { - rm ${TEST_FILE} ${TEST_FILE}.*.sig + rm ${SCRIPT_DIR}/${TEST_FILE} ${SCRIPT_DIR}/${TEST_FILE}.*.sig } # Determine script directory. @@ -87,6 +87,7 @@ else fi UTIL_DIR=`dirname ${SCRIPT_DIR}`/utils KEY_DIR=${SCRIPT_DIR}/testkeys +TEST_DIR=${SCRIPT_DIR}/ echo "Generating test cases..." pre_work @@ -101,7 +102,7 @@ test_verification echo echo "Cleaning up..." -#cleanup +cleanup exit $return_code diff --git a/utils/Makefile b/utils/Makefile index b13bc659..c1967fc6 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -3,33 +3,33 @@ # found in the LICENSE file. CC ?= gcc -CFLAGS=-Wall -ggdb +CFLAGS = -Wall -ggdb -DNDEBUG INCLUDES ?= -I../include/ TOP ?= ../ +LIBS = -lcrypto +FIRMWARELIBS = $(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a -LIBS=-lcrypto -FIRMWARELIBS=$(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a +all: dumpRSAPublicKey verify_data signature_digest firmware_utility -all: dumpRSAPublicKey verify_data signature_digest firmware_utility +dumpRSAPublicKey: dumpRSAPublicKey.c + $(CC) $(CFLAGS) $(LIBS) $< -o $@ -dumpRSAPublicKey: dumpRSAPublicKey.c - $(CC) $(CFLAGS) $(LIBS) $< -o $@ +verify_data: verify_data.c file_keys.o + $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ file_keys.o $(FIRMWARELIBS) -verify_data: verify_data.c file_keys.o - $(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $< -o $@ file_keys.o $(FIRMWARELIBS) +signature_digest: signature_digest.c + $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(FIRMWARELIBS) -signature_digest: signature_digest.c - $(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $< -o $@ $(FIRMWARELIBS) +firmware_utility: firmware_utility.c firmware_image.o file_keys.o + $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ firmware_image.o $(FIRMWARELIBS) -firmware_utility: firmware_utility.c firmware_image.o file_keys.o - $(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) $< -o $@ firmware_image.o $(FIRMWARELIBS) +file_keys.o: file_keys.c + $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ -file_keys.o: file_keys.c - $(CC) $(CFLAGS) -DNDEBUG $(INCLUDES) -c $< -o $@ +firmware_image.o: firmware_image.c + $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ -firmware_image.o: firmware_image.c - $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ clean: rm -f dumpRSAPublicKey verify_data signature_digest firmware_image.o file_keys.o |