1 1.1.1.8 mrg # Copyright (C) 2002-2020 Free Software Foundation, Inc. 2 1.1 mrg # 3 1.1 mrg # This file is part of GCC. 4 1.1 mrg # 5 1.1 mrg # GCC is free software; you can redistribute it and/or modify 6 1.1 mrg # it under the terms of the GNU General Public License as published by 7 1.1 mrg # the Free Software Foundation; either version 3, or (at your option) 8 1.1 mrg # any later version. 9 1.1 mrg # 10 1.1 mrg # GCC is distributed in the hope that it will be useful, 11 1.1 mrg # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 1.1 mrg # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 1.1 mrg # GNU General Public License for more details. 14 1.1 mrg # 15 1.1 mrg # You should have received a copy of the GNU General Public License 16 1.1 mrg # along with GCC; see the file COPYING3. If not see 17 1.1 mrg # <http://www.gnu.org/licenses/>. 18 1.1 mrg 19 1.1.1.8 mrg vxworks.o: $(srcdir)/config/vxworks.c 20 1.1.1.8 mrg $(COMPILE) $< 21 1.1.1.8 mrg $(POSTCOMPILE) 22 1.1.1.8 mrg 23 1.1.1.8 mrg vxworks-c.o: $(srcdir)/config/vxworks-c.c 24 1.1.1.8 mrg $(COMPILE) $< 25 1.1.1.8 mrg $(POSTCOMPILE) 26 1.1.1.8 mrg 27 1.1.1.8 mrg # Arrange to install our stdint.h wrapper, by copying it in the 28 1.1.1.8 mrg # build-time include dir before this include dir is installed and after 29 1.1.1.8 mrg # stmp-int-hdrs removes it (because it was told we don't provide it). 30 1.1.1.8 mrg 31 1.1.1.8 mrg INSTALL_HEADERS += install-stdint.h 32 1.1.1.8 mrg 33 1.1.1.8 mrg install-stdint.h: stmp-int-hdrs 34 1.1.1.8 mrg cp -p $(srcdir)/config/vxworks/stdint.h include/stdint.h 35 1.1.1.8 mrg chmod a+r include/stdint.h 36 1.1.1.8 mrg 37 1.1.1.8 mrg $(INSTALL_HEADERS_DIR): install-stdint.h 38 1.1.1.8 mrg 39 1.1.1.8 mrg # Both the kernel and RTP headers provide limits.h. They embed VxWorks 40 1.1.1.8 mrg # specificities and are dated on some configurations so we both need to 41 1.1.1.8 mrg # provide our own version and make sure the system one gets exposed. 42 1.1.1.8 mrg 43 1.1 mrg LIMITS_H_TEST = true 44 1.1.1.8 mrg STMP_FIXINC = stmp-fixinc 45 1.1.1.8 mrg 46 1.1.1.8 mrg # VxWorks system environments have been GCC based for a long time and we need 47 1.1.1.8 mrg # to make sure that our files and the system ones use distinct macro names to 48 1.1.1.8 mrg # protect against recursive inclusions. We achieve this by temporarily 49 1.1.1.8 mrg # substituting the headers used by stmp-int-headers with alternative versions 50 1.1.1.8 mrg # where we add some version indication in the inclusion-protection macro 51 1.1.1.8 mrg # names. 52 1.1.1.8 mrg 53 1.1.1.8 mrg # Before the standard stmp-int-headers operations take place, arrange to 54 1.1.1.8 mrg # copy the current version of the relevant header files locally, generate 55 1.1.1.8 mrg # the alternate version and replace the original version with ours: 56 1.1.1.8 mrg 57 1.1.1.8 mrg stmp-int-hdrs: subst-glimits.h 58 1.1.1.8 mrg 59 1.1.1.8 mrg subst-%.h: 60 1.1.1.8 mrg cp -p $(srcdir)/$*.h orig-$*.h 61 1.1.1.8 mrg ID=$$(echo $(BASEVER_c) | sed -e 's/\./_/g'); \ 62 1.1.1.8 mrg sed -e "s/_LIMITS_H__/_LIMITS_H_$${ID}_/" < $(srcdir)/$*.h > $@ 63 1.1.1.8 mrg cp $@ $(srcdir)/$*.h 64 1.1.1.8 mrg 65 1.1.1.8 mrg # Then arrange to restore the original versions after the standard 66 1.1.1.8 mrg # operations have taken place: 67 1.1.1.8 mrg 68 1.1.1.8 mrg INSTALL_HEADERS += restore-glimits.h 69 1.1 mrg 70 1.1.1.8 mrg restore-glimits.h: stmp-int-hdrs 71 1.1.1.8 mrg cp -p orig-glimits.h $(srcdir)/glimits.h 72