2011-03-20 18:18:19 +00:00
|
|
|
############################################################################
|
2018-12-12 16:37:38 -06:00
|
|
|
# apps/testing/ostest/Makefile
|
2011-03-20 18:18:19 +00:00
|
|
|
#
|
2024-12-29 16:26:09 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
#
|
2021-03-18 13:41:20 -06:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
|
# License. You may obtain a copy of the License at
|
2011-03-20 18:18:19 +00:00
|
|
|
#
|
2021-03-18 13:41:20 -06:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2011-03-20 18:18:19 +00:00
|
|
|
#
|
2021-03-18 13:41:20 -06:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
|
# under the License.
|
2011-03-20 18:18:19 +00:00
|
|
|
#
|
|
|
|
|
############################################################################
|
|
|
|
|
|
2020-05-20 12:35:03 +08:00
|
|
|
include $(APPDIR)/Make.defs
|
2011-03-20 18:18:19 +00:00
|
|
|
|
2012-03-22 00:51:01 +00:00
|
|
|
# ostest built-in application info
|
|
|
|
|
|
2019-10-06 06:14:39 -06:00
|
|
|
PROGNAME = ostest
|
2014-09-07 08:43:01 -06:00
|
|
|
PRIORITY = SCHED_PRIORITY_DEFAULT
|
2020-03-27 13:57:26 +09:00
|
|
|
STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
|
2019-10-06 06:14:39 -06:00
|
|
|
MODULE = $(CONFIG_TESTING_OSTEST)
|
2012-03-22 00:51:01 +00:00
|
|
|
|
2011-03-20 18:18:19 +00:00
|
|
|
# NuttX OS Test
|
|
|
|
|
|
2026-01-27 17:49:19 +08:00
|
|
|
CSRCS = getopt.c libc_memmem.c restart.c sighelper.c
|
2024-03-11 16:30:48 +02:00
|
|
|
|
2026-01-16 22:47:13 +08:00
|
|
|
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
|
|
|
|
CSRCS += sighand.c signest.c
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_DISABLE_ALL_SIGNALS),y)
|
|
|
|
|
CSRCS += sigprocmask.c
|
|
|
|
|
endif
|
|
|
|
|
|
2014-09-07 08:43:01 -06:00
|
|
|
MAINSRC = ostest_main.c
|
2011-03-20 18:18:19 +00:00
|
|
|
|
2023-07-17 06:50:45 +08:00
|
|
|
ifeq ($(CONFIG_DEV_NULL),y)
|
|
|
|
|
CSRCS += dev_null.c
|
|
|
|
|
endif
|
|
|
|
|
|
2018-08-30 12:00:41 -06:00
|
|
|
ifeq ($(CONFIG_SIG_SIGSTOP_ACTION),y)
|
|
|
|
|
ifeq ($(CONFIG_SIG_SIGKILL_ACTION),y)
|
|
|
|
|
CSRCS += suspend.c
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2012-02-24 21:34:55 +00:00
|
|
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
2018-12-12 16:37:38 -06:00
|
|
|
ifneq ($(CONFIG_TESTING_OSTEST_FPUTESTDISABLE),y)
|
2014-09-07 08:43:01 -06:00
|
|
|
CSRCS += fpu.c
|
2012-02-24 21:34:55 +00:00
|
|
|
endif
|
2016-12-29 11:47:09 -06:00
|
|
|
endif
|
2012-02-24 21:34:55 +00:00
|
|
|
|
2017-02-09 10:58:51 -06:00
|
|
|
ifneq ($(CONFIG_STDIO_DISABLE_BUFFERING),y)
|
|
|
|
|
CSRCS += setvbuf.c
|
|
|
|
|
endif
|
|
|
|
|
|
2020-05-07 09:56:21 -06:00
|
|
|
ifneq ($(CONFIG_TLS_NELEM),0)
|
2016-03-11 14:02:00 -06:00
|
|
|
CSRCS += tls.c
|
|
|
|
|
endif
|
|
|
|
|
|
2024-12-16 15:28:55 -03:00
|
|
|
ifeq ($(CONFIG_SCHED_THREAD_LOCAL),y)
|
|
|
|
|
CSRCS += sched_thread_local.c
|
|
|
|
|
endif
|
|
|
|
|
|
2018-12-12 16:37:38 -06:00
|
|
|
ifeq ($(CONFIG_TESTING_OSTEST_AIO),y)
|
2014-10-05 13:24:03 -06:00
|
|
|
CSRCS += aio.c
|
|
|
|
|
endif
|
|
|
|
|
|
2026-06-18 08:00:29 +00:00
|
|
|
ifeq ($(CONFIG_TESTING_OSTEST_MULTIUSER),y)
|
|
|
|
|
CSRCS += multiuser.c
|
|
|
|
|
endif
|
|
|
|
|
|
2013-01-13 18:53:00 +00:00
|
|
|
ifeq ($(CONFIG_SCHED_WAITPID),y)
|
2014-09-07 08:43:01 -06:00
|
|
|
CSRCS += waitpid.c
|
2013-01-13 18:53:00 +00:00
|
|
|
endif
|
|
|
|
|
|
2011-03-20 18:18:19 +00:00
|
|
|
ifneq ($(CONFIG_DISABLE_PTHREAD),y)
|
2019-02-24 15:43:45 -06:00
|
|
|
CSRCS += cancel.c cond.c mutex.c timedmutex.c sem.c semtimed.c barrier.c
|
2023-04-11 16:06:11 +03:00
|
|
|
CSRCS += timedwait.c pthread_rwlock.c pthread_rwlock_cancel.c schedlock.c
|
2017-03-27 06:55:51 -06:00
|
|
|
|
2023-06-28 09:37:49 -06:00
|
|
|
ifeq ($(CONFIG_SCHED_WAITPID),y)
|
|
|
|
|
CSRCS += pthread_exit.c
|
|
|
|
|
endif
|
|
|
|
|
|
2020-05-08 08:52:53 -06:00
|
|
|
ifneq ($(CONFIG_TLS_NELEM),0)
|
2018-12-28 14:17:40 -06:00
|
|
|
CSRCS += specific.c
|
|
|
|
|
endif
|
|
|
|
|
|
2024-09-03 16:15:04 +08:00
|
|
|
ifneq ($(CONFIG_TLS_NCLEANUP),0)
|
2017-04-10 07:20:48 -06:00
|
|
|
CSRCS += pthread_cleanup.c
|
2017-03-27 06:55:51 -06:00
|
|
|
endif
|
2015-07-24 13:50:31 -06:00
|
|
|
|
2017-04-10 07:20:48 -06:00
|
|
|
ifneq ($(CONFIG_PTHREAD_MUTEX_UNSAFE),y)
|
|
|
|
|
CSRCS += robust.c
|
2014-09-28 13:02:36 -06:00
|
|
|
endif
|
2015-07-24 13:50:31 -06:00
|
|
|
|
2017-03-27 09:08:00 -06:00
|
|
|
ifeq ($(CONFIG_PTHREAD_MUTEX_TYPES),y)
|
2014-09-07 08:43:01 -06:00
|
|
|
CSRCS += rmutex.c
|
2015-07-24 13:50:31 -06:00
|
|
|
endif
|
|
|
|
|
|
2017-04-10 07:20:48 -06:00
|
|
|
ifeq ($(CONFIG_FS_NAMED_SEMAPHORES),y)
|
|
|
|
|
CSRCS += nsem.c
|
|
|
|
|
endif
|
|
|
|
|
|
2015-07-24 13:50:31 -06:00
|
|
|
ifneq ($(CONFIG_RR_INTERVAL),0)
|
|
|
|
|
CSRCS += roundrobin.c
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_SCHED_SPORADIC),y)
|
2021-03-18 13:41:20 -06:00
|
|
|
CSRCS += sporadic.c sporadic2.c
|
2015-07-24 13:50:31 -06:00
|
|
|
endif
|
2023-03-15 21:53:27 +08:00
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_SCHED_WORKQUEUE),y)
|
|
|
|
|
CSRCS += wqueue.c
|
|
|
|
|
endif
|
2023-04-11 16:06:11 +03:00
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_PRIORITY_INHERITANCE),y)
|
|
|
|
|
CSRCS += prioinherit.c
|
|
|
|
|
endif
|
2011-03-20 18:18:19 +00:00
|
|
|
endif # CONFIG_DISABLE_PTHREAD
|
|
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_DISABLE_MQUEUE),y)
|
|
|
|
|
ifneq ($(CONFIG_DISABLE_PTHREAD),y)
|
2026-01-16 22:47:13 +08:00
|
|
|
CSRCS += timedmqueue.c
|
|
|
|
|
ifneq ($(CONFIG_DISABLE_ALL_SIGNALS),y)
|
|
|
|
|
CSRCS += mqueue.c
|
|
|
|
|
endif
|
2011-03-20 18:18:19 +00:00
|
|
|
endif # CONFIG_DISABLE_PTHREAD
|
|
|
|
|
endif # CONFIG_DISABLE_MQUEUE
|
|
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_DISABLE_POSIX_TIMERS),y)
|
2014-09-07 08:43:01 -06:00
|
|
|
CSRCS += posixtimer.c
|
2015-12-30 16:29:21 -06:00
|
|
|
ifeq ($(CONFIG_SIG_EVTHREAD),y)
|
|
|
|
|
CSRCS += sigev_thread.c
|
|
|
|
|
endif
|
2011-03-20 18:18:19 +00:00
|
|
|
endif
|
|
|
|
|
|
2023-08-13 20:14:34 +09:00
|
|
|
ifeq ($(CONFIG_ARCH_HAVE_FORK),y)
|
2013-02-08 22:53:14 +00:00
|
|
|
ifeq ($(CONFIG_SCHED_WAITPID),y)
|
2014-09-07 08:43:01 -06:00
|
|
|
CSRCS += vfork.c
|
2013-01-07 21:41:20 +00:00
|
|
|
endif
|
2013-02-08 22:53:14 +00:00
|
|
|
endif
|
2013-01-07 21:41:20 +00:00
|
|
|
|
2022-02-28 15:41:53 +08:00
|
|
|
ifeq ($(CONFIG_ARCH_SETJMP_H),y)
|
|
|
|
|
CSRCS += setjmp.c
|
|
|
|
|
endif
|
|
|
|
|
|
2024-09-29 22:04:42 +08:00
|
|
|
ifeq ($(CONFIG_SMP),y)
|
2023-10-18 11:24:13 +08:00
|
|
|
CSRCS += smp_call.c
|
|
|
|
|
endif
|
|
|
|
|
|
2024-08-02 14:46:45 +08:00
|
|
|
ifeq ($(CONFIG_SCHED_EVENTS),y)
|
|
|
|
|
ifeq ($(CONFIG_BUILD_FLAT),y)
|
|
|
|
|
CSRCS += nxevent.c
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2026-07-29 14:04:14 +02:00
|
|
|
# perf_gettime() and perf_getfreq() live in the kernel and are not system
|
|
|
|
|
# calls, so only a flat build can reach them from here.
|
|
|
|
|
|
2026-02-01 15:16:37 +08:00
|
|
|
ifeq ($(CONFIG_ARCH_HAVE_PERF_EVENTS),y)
|
2026-07-29 14:04:14 +02:00
|
|
|
ifeq ($(CONFIG_BUILD_FLAT),y)
|
2026-02-01 15:16:37 +08:00
|
|
|
CSRCS += perf_gettime.c
|
|
|
|
|
endif
|
2026-07-29 14:04:14 +02:00
|
|
|
endif
|
2026-02-01 15:16:37 +08:00
|
|
|
|
2024-07-22 10:40:33 +08:00
|
|
|
ifeq ($(CONFIG_BUILD_FLAT),y)
|
2026-01-27 17:49:19 +08:00
|
|
|
CSRCS += wdog.c spinlock.c
|
2026-01-29 16:13:52 +08:00
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_HRTIMER),y)
|
|
|
|
|
CSRCS += hrtimer.c
|
|
|
|
|
endif
|
2024-07-22 10:40:33 +08:00
|
|
|
endif
|
|
|
|
|
|
2015-09-05 13:37:38 -04:00
|
|
|
include $(APPDIR)/Application.mk
|