1# Copyright 2017 The Fuchsia 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
5LOCAL_DIR := $(GET_LOCAL_DIR)
6
7# Userspace library.
8
9MODULE := $(LOCAL_DIR)
10
11MODULE_TYPE := userlib
12MODULE_COMPILEFLAGS += -fvisibility=hidden
13
14MODULE_SRCS = \
15    $(LOCAL_DIR)/reader.cpp \
16    $(LOCAL_DIR)/reader_internal.cpp \
17    $(LOCAL_DIR)/records.cpp
18
19# This is for building in zircon.
20MODULE_HEADER_DEPS := \
21    system/ulib/trace-engine
22
23# trace-engine.headers-for-reader is for building outsize of zircon.
24# We cannot declare a dependency on trace-engine itself because then
25# our users will get a libtrace-engine.so dependency. And we don't
26# declare a dependency on trace-engine-static: We only need these headers.
27MODULE_STATIC_LIBS := \
28    system/ulib/trace-engine.headers-for-reader \
29    system/ulib/zxcpp \
30    system/ulib/fbl
31
32MODULE_LIBS := \
33    system/ulib/c
34
35MODULE_PACKAGE := src
36
37include make/module.mk
38
39# Host library.
40
41MODULE := $(LOCAL_DIR).hostlib
42
43MODULE_TYPE := hostlib
44MODULE_COMPILEFLAGS += -fvisibility=hidden
45
46MODULE_SRCS = \
47    $(LOCAL_DIR)/reader.cpp \
48    $(LOCAL_DIR)/records.cpp
49
50MODULE_HEADER_DEPS := \
51    system/ulib/trace-engine
52
53MODULE_COMPILEFLAGS := \
54    -Isystem/ulib/fbl/include
55
56MODULE_HOST_LIBS := \
57    system/ulib/fbl.hostlib
58
59include make/module.mk
60