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
27# This separate library is a hack to deal with these functions needing to be compiled with
28# -fno-stack-protector
29MODULE_STATIC_LIBS += system/utest/core/threads/thread-functions
30
31MODULE_LIBS := \
32    system/ulib/unittest \
33    system/ulib/mini-process \
34    system/ulib/zircon \
35    system/ulib/c
36
37MODULE_DEFINES := BUILD_COMBINED_TESTS=1
38
39# core/channel needs a header file generated by kernel/lib/vdso/rules.mk.
40MODULE_COMPILEFLAGS += -I$(BUILDDIR)/kernel/lib/vdso
41MODULE_SRCDEPS += $(BUILDDIR)/kernel/lib/vdso/vdso-code.h
42
43include make/module.mk
44
45MODULES += $(patsubst %/rules.mk,%,$(wildcard $(LOCAL_DIR)/*/rules.mk))
46