1# Copyright 2016 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
7MODULE := $(LOCAL_DIR)
8
9MODULE_TYPE := userapp
10MODULE_GROUP := test
11
12MODULE_SRCS := \
13    $(wildcard $(LOCAL_DIR)/*/*.c) \
14    $(wildcard $(LOCAL_DIR)/*/*.cpp) \
15    $(wildcard $(LOCAL_DIR)/*/*.S) \
16    $(LOCAL_DIR)/main.c \
17
18MODULE_NAME := core-tests
19
20MODULE_STATIC_LIBS := \
21    system/ulib/ddk \
22    system/ulib/fbl \
23    system/ulib/runtime \
24    system/ulib/sync \
25    system/ulib/zx \
26    system/ulib/zxcpp
27
28# This separate library is a hack to deal with these functions needing to be compiled with
29# -fno-stack-protector
30MODULE_STATIC_LIBS += system/utest/core/threads/thread-functions
31
32MODULE_LIBS := \
33    system/ulib/unittest \
34    system/ulib/mini-process \
35    system/ulib/zircon \
36    system/ulib/c
37
38MODULE_DEFINES := BUILD_COMBINED_TESTS=1
39
40# core/channel needs a header file generated by kernel/lib/vdso/rules.mk.
41MODULE_COMPILEFLAGS += -I$(BUILDDIR)/kernel/lib/vdso
42MODULE_SRCDEPS += $(BUILDDIR)/kernel/lib/vdso/vdso-code.h
43
44include make/module.mk
45
46MODULES += $(patsubst %/rules.mk,%,$(wildcard $(LOCAL_DIR)/*/rules.mk))
47