1# 2# SPDX-License-Identifier: BSD-3-Clause 3# 4# Copyright © 2019 Keith Packard 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: 9# 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 13# 2. Redistributions in binary form must reproduce the above 14# copyright notice, this list of conditions and the following 15# disclaimer in the documentation and/or other materials provided 16# with the distribution. 17# 18# 3. Neither the name of the copyright holder nor the names of its 19# contributors may be used to endorse or promote products derived 20# from this software without specific prior written permission. 21# 22# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 27# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 33# OF THE POSSIBILITY OF SUCH DAMAGE. 34# 35srcs_time = [ 36 'asctime.c', 37 'asctime_r.c', 38 'clock.c', 39 'ctime.c', 40 'ctime_r.c', 41 'difftime.c', 42 'gettzinfo.c', 43 'gmtime.c', 44 'gmtime_r.c', 45 'lcltime.c', 46 'lcltime_r.c', 47 'lcltime_buf.c', 48 'mktime.c', 49 'month_lengths.c', 50 'strftime.c', 51 'strptime.c', 52 'time.c', 53 'tzcalc_limits.c', 54 'tzset.c', 55 'tzvars.c', 56 'wcsftime.c', 57] 58 59hdrs_time = [ 60 'local.h', 61] 62 63srcs_time_use = [] 64foreach file : srcs_time 65 s_file = fs.replace_suffix(file, '.S') 66 if file in srcs_machine 67 message('libc/time/' + file + ': machine overrides generic') 68 elif s_file in srcs_machine 69 message('libc/time/' + s_file + ': machine overrides generic') 70 else 71 srcs_time_use += file 72 endif 73endforeach 74 75src_time = files(srcs_time_use) 76