File: Makefile

package info (click to toggle)
vboot-utils 0~20121212-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,472 kB
  • ctags: 3,862
  • sloc: ansic: 28,549; sh: 5,113; cpp: 2,098; makefile: 664; python: 350
file content (46 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

HOSTTOP := $(shell pwd)
TESTDIR = $(HOSTTOP)/linktest
BUILD_ROOT := ${BUILD}/$(shell basename ${HOSTTOP})

INCLUDES += \
	-I$(HOSTTOP)/include \
	-I$(HOSTTOP)/arch/$(ARCH)/include \
	-I$(FWDIR)/lib/include \
	-I$(FWDIR)/lib/cgptlib/include \
	-I$(FWDIR)/lib/cryptolib/include

# find ./lib -iname '*.c' | sort
LIB_SRCS = \
	./arch/$(ARCH)/lib/crossystem_arch.c \
	./lib/crossystem.c \
	./lib/file_keys.c \
	./lib/fmap.c \
	./lib/host_common.c \
	./lib/host_key.c \
	./lib/host_keyblock.c \
	./lib/host_misc.c \
	./lib/host_signature.c \
	./lib/signature_digest.c

STUB_SRCS = \
	../firmware/stub/tpm_lite_stub.c \
	../firmware/stub/utility_stub.c \
	../firmware/stub/vboot_api_stub.c

ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS}

test : $(HOSTLIB)
	$(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out $(TESTDIR)/main.c \
	$(HOSTLIB) -lcrypto

include ../build.mk

$(HOSTLIB) : $(ALL_OBJS) $(FWLIB)
	rm -rf $@ $(BUILD_ROOT)/.tmp
	mkdir -p $(BUILD_ROOT)/.tmp
	cd $(BUILD_ROOT)/.tmp ; ar x $(FWLIB)
	ar qc $@ $^ $(BUILD_ROOT)/.tmp/*.o