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