OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 LIBNAME = vboot_host.a |
| 6 |
| 7 CC ?= gcc |
| 8 CFLAGS = -Wall -DNDEBUG -O3 -Werror |
| 9 |
| 10 HOSTTOP := $(shell pwd) |
| 11 LIBDIR = $(HOSTTOP)/lib |
| 12 TESTDIR = $(HOSTTOP)/linktest |
| 13 |
| 14 INCLUDES += \ |
| 15 -I$(HOSTTOP)/include \ |
| 16 -I$(FWDIR)/lib/include \ |
| 17 -I$(FWDIR)/lib/cgptlib/include \ |
| 18 -I$(FWDIR)/lib/cryptolib/include |
| 19 |
| 20 # find ./lib -iname '*.c' | sort |
| 21 LIB_SRCS = \ |
| 22 ./lib/host_common.c \ |
| 23 ./lib/host_key.c \ |
| 24 ./lib/host_signature.c |
| 25 |
| 26 LIB_OBJS = $(LIB_SRCS:%.c=%.o) |
| 27 |
| 28 test : $(LIBNAME) |
| 29 $(CC) $(CFLAGS) $(INCLUDES) -o $(TESTDIR)/a.out $(TESTDIR)/main.c \ |
| 30 $(LIBNAME) $(FWLIB) $(TOP)/misclibs/file_keys.o -lcrypto |
| 31 |
| 32 $(LIBNAME) : $(LIB_OBJS) $(STUB_OBJS) |
| 33 rm -f $@ |
| 34 ar qc $@ $^ |
| 35 |
| 36 %o : %c |
| 37 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< |
| 38 |
| 39 clean: FORCE |
| 40 rm -f $(LIBNAME) $(LIB_OBJS) $(STUB_OBJS) $(TESTDIR)/a.out |
| 41 |
| 42 FORCE: |
| 43 |
| 44 |
| 45 .PHONY: FORCE |
OLD | NEW |