xref: /aosp_15_r20/trusty/kernel/lib/libc-trusty/test/rules.mk (revision 344aa361028b423587d4ef3fa52a23d194628137)
1*344aa361SAndroid Build Coastguard Worker# Copyright (C) 2022 The Android Open Source Project
2*344aa361SAndroid Build Coastguard Worker#
3*344aa361SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
4*344aa361SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
5*344aa361SAndroid Build Coastguard Worker# You may obtain a copy of the License at
6*344aa361SAndroid Build Coastguard Worker#
7*344aa361SAndroid Build Coastguard Worker#      http://www.apache.org/licenses/LICENSE-2.0
8*344aa361SAndroid Build Coastguard Worker#
9*344aa361SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*344aa361SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
11*344aa361SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*344aa361SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
13*344aa361SAndroid Build Coastguard Worker# limitations under the License.
14*344aa361SAndroid Build Coastguard Worker#
15*344aa361SAndroid Build Coastguard Worker
16*344aa361SAndroid Build Coastguard WorkerLOCAL_DIR := $(GET_LOCAL_DIR)
17*344aa361SAndroid Build Coastguard Worker
18*344aa361SAndroid Build Coastguard WorkerMODULE := $(LOCAL_DIR)
19*344aa361SAndroid Build Coastguard Worker
20*344aa361SAndroid Build Coastguard WorkerLIBC_TRUSTY_TEST_DIR := trusty/user/base/lib/libc-trusty/test
21*344aa361SAndroid Build Coastguard Worker
22*344aa361SAndroid Build Coastguard WorkerMODULE_SRCS += \
23*344aa361SAndroid Build Coastguard Worker	$(LIBC_TRUSTY_TEST_DIR)/libc_test.c \
24*344aa361SAndroid Build Coastguard Worker
25*344aa361SAndroid Build Coastguard Worker# We're doing some strange things like passing bad format strings to printf. The
26*344aa361SAndroid Build Coastguard Worker# compiler can interfere with these tests, so prevent it from making assumptions
27*344aa361SAndroid Build Coastguard Worker# about function names. This also prevents rewriting like printf => puts.
28*344aa361SAndroid Build Coastguard WorkerMODULE_COMPILEFLAGS := -ffreestanding -Wno-format-invalid-specifier
29*344aa361SAndroid Build Coastguard Worker
30*344aa361SAndroid Build Coastguard Workerinclude make/module.mk
31