1 # GNU -*-Makefile-*- to build GNU make on VMS
3 # VMS overrides for use with Basic.mk.
5 # Copyright (C) 2017-2022 Free Software Foundation, Inc.
6 # This file is part of GNU Make.
8 # GNU Make is free software; you can redistribute it and/or modify it under
9 # the terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 3 of the License, or (at your option) any later
13 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 # You should have received a copy of the GNU General Public License along with
19 # this program. If not, see <https://www.gnu.org/licenses/>.
35 defs += VMS unlink=remove allocated_variable_expand_for_file=alloc_var_expand_for_file
43 extra_CPPFLAGS = /define=($(subst $s,$c,$(patsubst %,"%",$(defs))))
45 cinclude = /nested=none/include=($(src),$(lib))
47 cprefix = /prefix=(all,except=(glob,globfree))
48 cwarn = /standard=relaxed/warn=(disable=questcompare)
51 extra_CFLAGS = $(cinclude)$(cprefix)$(cwarn)
56 # If your system needs extra libraries loaded in, define them here.
57 # System V probably need -lPW for alloca.
58 # if on vax, uncomment the following line
61 #LDLIBS =,sys$$library:vaxcrtl.olb/lib
63 LDLIBS =,gnu_cc_library:libgcc.olb/lib
66 # If your system doesn't have alloca, or the one provided is bad,
68 #ALLOCA = $(alloca_SOURCES)
70 # If your system doesn't have alloca.h, or the one provided is bad,
72 #BUILT_SOURCES += $(lib)alloca.h
74 prog_SOURCES += $(ALLOCA) $(glob_SOURCES) $(vms_SOURCES)
76 BUILT_SOURCES += $(lib)fnmatch.h $(lib)glob.h
78 COMPILE.cmd = $(CC) $(extra_CFLAGS)$(CFLAGS)/obj=$@ $(extra_CPPFLAGS)$(CPPFLAGS) $1
80 LINK.cmd = $(LD)$(extra_LDFLAGS)$(LDFLAGS)/exe=$@ $(subst $s,$c,$1)$(LDLIBS)
82 # Don't know how to do this
85 MKDIR.cmd = create/dir $1
92 -delete $(src)*.$(OBJEXT);
96 $(OUTDIR)$(src)config.h: $(SRCDIR)$(src)config.h-vms