| 1 |
# Copyright (C) 2002-2025 Free Software Foundation, Inc. |
| 2 |
# |
| 3 |
# This file is part of GCC. |
| 4 |
# |
| 5 |
# GCC is free software; you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License as published by |
| 7 |
# the Free Software Foundation; either version 3, or (at your option) |
| 8 |
# any later version. |
| 9 |
# |
| 10 |
# GCC is distributed in the hope that it will be useful, |
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
# GNU General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU General Public License |
| 16 |
# along with GCC; see the file COPYING3. If not see |
| 17 |
# <http://www.gnu.org/licenses/>. |
| 18 |
|
| 19 |
vxworks-driver.o: $(srcdir)/config/vxworks-driver.cc |
| 20 |
$(COMPILE) $< |
| 21 |
$(POSTCOMPILE) |
| 22 |
|
| 23 |
vxworks.o: $(srcdir)/config/vxworks.cc |
| 24 |
$(COMPILE) $< |
| 25 |
$(POSTCOMPILE) |
| 26 |
|
| 27 |
vxworks-c.o: $(srcdir)/config/vxworks-c.cc |
| 28 |
$(COMPILE) $< |
| 29 |
$(POSTCOMPILE) |
| 30 |
|
| 31 |
vxworks-rust.o: $(srcdir)/config/vxworks-rust.cc |
| 32 |
$(COMPILE) $< |
| 33 |
$(POSTCOMPILE) |
| 34 |
|
| 35 |
# We leverage $sysroot to find target system headers only, distributed |
| 36 |
# in a VxWorks (a)typical fashion with a different set of headers for |
| 37 |
# rtp vs kernel mode. We setup SYSROOT_HEADERS_SUFFIX_SPEC to handle |
| 38 |
# this, and need to clear NATIVE_SYSTEM_HEADER_DIR to prevent it from |
| 39 |
# interfering. |
| 40 |
|
| 41 |
NATIVE_SYSTEM_HEADER_DIR = |
| 42 |
|
| 43 |
# Both the kernel and RTP headers provide limits.h. They embed VxWorks |
| 44 |
# specificities and are dated on some configurations so we both need to |
| 45 |
# provide our own version and make sure the system one gets exposed. |
| 46 |
|
| 47 |
LIMITS_H_TEST = true |
| 48 |
|
| 49 |
# VxWorks system environments have been GCC based for a long time and |
| 50 |
# we need to make sure that our files and the system ones use distinct |
| 51 |
# macro names to protect against recursive inclusions. We achieve |
| 52 |
# this by modifying the GLIMITS_H fragment that goes into limits.h |
| 53 |
# with some version indication in the inclusion-protection macro |
| 54 |
# names. |
| 55 |
|
| 56 |
T_GLIMITS_H = vxw-glimits.h |
| 57 |
|
| 58 |
vxw-glimits.h: $(srcdir)/glimits.h |
| 59 |
ID=`echo $(BASEVER_c) | sed -e 's/\./_/g'` && \ |
| 60 |
sed -e "s/_LIMITS_H___/_LIMITS_H__$${ID}_/" < $< > $@T |
| 61 |
mv $@T $@ |
| 62 |
|
| 63 |
# Arrange to "provide" a tailored version of stdint-gcc.h |
| 64 |
|
| 65 |
T_STDINT_GCC_H = vxw-stdint-gcc.h |
| 66 |
|
| 67 |
vxw-stdint-gcc.h: $(srcdir)/ginclude/stdint-gcc.h |
| 68 |
sed -e "/#define _GCC_STDINT_H/ a #include <_yvals.h>" < $< > $@T |
| 69 |
mv $@T $@ |