t-vxworks revision 1.11
1# Copyright (C) 2002-2020 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 19vxworks.o: $(srcdir)/config/vxworks.c 20 $(COMPILE) $< 21 $(POSTCOMPILE) 22 23vxworks-c.o: $(srcdir)/config/vxworks-c.c 24 $(COMPILE) $< 25 $(POSTCOMPILE) 26 27# Arrange to install our stdint.h wrapper, by copying it in the 28# build-time include dir before this include dir is installed and after 29# stmp-int-hdrs removes it (because it was told we don't provide it). 30 31INSTALL_HEADERS += install-stdint.h 32 33install-stdint.h: stmp-int-hdrs 34 cp -p $(srcdir)/config/vxworks/stdint.h include/stdint.h 35 chmod a+r include/stdint.h 36 37$(INSTALL_HEADERS_DIR): install-stdint.h 38 39# Both the kernel and RTP headers provide limits.h. They embed VxWorks 40# specificities and are dated on some configurations so we both need to 41# provide our own version and make sure the system one gets exposed. 42 43LIMITS_H_TEST = true 44STMP_FIXINC = stmp-fixinc 45 46# VxWorks system environments have been GCC based for a long time and we need 47# to make sure that our files and the system ones use distinct macro names to 48# protect against recursive inclusions. We achieve this by temporarily 49# substituting the headers used by stmp-int-headers with alternative versions 50# where we add some version indication in the inclusion-protection macro 51# names. 52 53# Before the standard stmp-int-headers operations take place, arrange to 54# copy the current version of the relevant header files locally, generate 55# the alternate version and replace the original version with ours: 56 57stmp-int-hdrs: subst-glimits.h 58 59subst-%.h: 60 cp -p $(srcdir)/$*.h orig-$*.h 61 ID=$$(echo $(BASEVER_c) | sed -e 's/\./_/g'); \ 62 sed -e "s/_LIMITS_H__/_LIMITS_H_$${ID}_/" < $(srcdir)/$*.h > $@ 63 cp $@ $(srcdir)/$*.h 64 65# Then arrange to restore the original versions after the standard 66# operations have taken place: 67 68INSTALL_HEADERS += restore-glimits.h 69 70restore-glimits.h: stmp-int-hdrs 71 cp -p orig-glimits.h $(srcdir)/glimits.h 72