1 # -*-Makefile-*- to build GNU make on VMS 2 # 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 4 # 2006 Free Software Foundation, Inc. 5 # This file is part of GNU Make. 6 # 7 # GNU Make is free software; you can redistribute it and/or modify it under the 8 # terms of the GNU General Public License as published by the Free Software 9 # Foundation; either version 2, or (at your option) any later version. 10 # 11 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY 12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 13 # A PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License along with 16 # GNU Make; see the file COPYING. If not, write to the Free Software 17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 19 # VMS extensions from GNU Make 3.60 imported by 20 # Klaus Kmpf (kkaempf (a] rmi.de) 21 # Modified for version 3.78.1 by Hartmut.Becker (a] compaq.com. 22 # Modified for version 3.80 by zinser (a] decus.de 23 # Modified for version 3.81 by Hartmut Becker 24 25 CC = cc 26 CP = copy 27 28 %.obj: %.c 29 $(CC) $(CFLAGS)/obj=$@ $< 30 # 31 # Makefile for GNU Make 32 # 33 34 ifeq ($(CC),cc) 35 CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare) 36 else 37 CFLAGS = $(defines) /include=([],[.glob]) 38 endif 39 #LDFLAGS = /deb 40 LDFLAGS = 41 42 ifeq ($(CC),cc) 43 defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file") 44 else 45 ifeq ($(ARCH),VAX) 46 defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE","VAX") 47 else 48 defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE") 49 endif 50 endif 51 52 LOAD_AVG = /define="NO_LDAV" 53 54 # If you don't want archive support, comment these out. 55 ARCHIVES = ,ar.obj,arscan.obj 56 ARCHIVES_SRC = ar.c arscan.c 57 58 # If your system needs extra libraries loaded in, define them here. 59 # System V probably need -lPW for alloca. 60 # if on vax, uncomment the following line 61 #LOADLIBES = ,c.opt/opt 62 ifeq ($(CC),cc) 63 #LOADLIBES =,sys$$library:vaxcrtl.olb/lib 64 CRT0 = 65 else 66 LOADLIBES =,gnu_cc_library:libgcc.olb/lib 67 endif 68 69 # If your system doesn't have alloca, or the one provided is bad, 70 # get it from the Emacs distribution and define these. 71 #ALLOCA = ,alloca.obj 72 #ALLOCASRC = alloca.c 73 74 # If there are remote execution facilities defined, 75 # enable them with switches here (see remote-*.c). 76 REMOTE = 77 78 # Any extra object files your system needs. 79 extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj 80 #,directory.obj 81 # as an alternative: 82 glob = ,[.glob]glob.obj,[.glob]fnmatch.obj 83 getopt = ,getopt.obj,getopt1.obj 84 # Directory to install `make' in. 85 bindir = [] 86 # Directory to install the man page in. 87 mandir = [] 88 # Number to put on the man page filename. 89 manext = 1 90 91 objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,hash.obj,\ 92 main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\ 93 default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\ 94 vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob) 95 srcs = commands.c job.c dir.c file.c misc.c hash.c \ 96 main.c read.c remake.c rule.c implicit.c \ 97 default.c variable.c expand.c function.c strcache.c \ 98 vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \ 99 commands.h dep.h filedef.h job.h make.h rule.h variable.h 100 101 102 .PHONY: all doc 103 all: config.h make.exe 104 105 doc: make.info make.dvi 106 107 108 make.exe: $(objs) 109 $(LD)$(LDFLAGS)/exe=$@ $^$(LOADLIBES)$(CRT0) 110 111 .PHONY: clean realclean 112 clean: 113 $$ purge [...] 114 -$(RM) make.exe;,*.obj; 115 -$(RM) [.glob]*.obj; 116 117 # Automatically generated dependencies. 118 commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h 119 job.obj: job.c vmsjobs.c make.h commands.h job.h filedef.h variable.h 120 dir.obj: dir.c make.h 121 file.obj: file.c make.h commands.h dep.h filedef.h variable.h 122 misc.obj: misc.c make.h dep.h 123 hash.obj: hash.c make.h hash.h 124 strcache.obj: strcache.c make.h hash.h 125 main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h 126 read.obj: read.c make.h commands.h dep.h filedef.h variable.h 127 remake.obj: remake.c make.h commands.h job.h dep.h filedef.h 128 rule.obj: rule.c make.h commands.h dep.h filedef.h variable.h rule.h 129 implicit.obj: implicit.c make.h rule.h dep.h filedef.h 130 default.obj: default.c make.h rule.h dep.h filedef.h commands.h variable.h 131 variable.obj: variable.c make.h commands.h variable.h dep.h filedef.h 132 expand.obj: expand.c make.h commands.h filedef.h variable.h 133 function.obj: function.c make.h variable.h dep.h commands.h job.h 134 vpath.obj: vpath.c make.h filedef.h variable.h 135 version.obj: version.c config.h 136 arscan.obj: arscan.c 137 ar.obj: ar.c make.h filedef.h 138 signame.obj: signame.c 139 remote-stub.obj: remote-stub.c 140 [.glob]glob.obj: [.glob]glob.c 141 [.glob]fnmatch.obj: [.glob]fnmatch.c 142 getopt.obj: getopt.c 143 getopt1.obj: getopt1.c 144 vmsfunctions.obj: vmsfunctions.c make.h vmsdir.h 145 vmsify.obj: vmsify.c make.h 146 147 config.h: config.h-vms 148 $(CP) $< $@ 149