1 | # -*-Makefile-*- to build GNU make on VMS
|
---|
2 | #
|
---|
3 | # Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
---|
4 | # This file is part of GNU Make.
|
---|
5 | #
|
---|
6 | # GNU Make is free software; you can redistribute it and/or modify it under
|
---|
7 | # the terms of the GNU General Public License as published by the Free Software
|
---|
8 | # Foundation; either version 3 of the License, or (at your option) any later
|
---|
9 | # 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
|
---|
13 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
---|
14 | # details.
|
---|
15 | #
|
---|
16 | # You should have received a copy of the GNU General Public License along with
|
---|
17 | # this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
18 |
|
---|
19 | # VMS extensions from GNU Make 3.60 imported by
|
---|
20 | # Klaus Kämpf ([email protected])
|
---|
21 | # Modified for version 3.78.1 by [email protected].
|
---|
22 | # Modified for version 3.80 by [email protected]
|
---|
23 | # Modified for versions 3.81, 3.99.90 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 | cinclude = /nested=none/include=([],[.glob])
|
---|
36 | cprefix = /prefix=(all,except=(glob,globfree))
|
---|
37 | cwarn = /standard=relaxed/warn=(disable=questcompare)
|
---|
38 | CFLAGS = $(defines) $(cinclude)$(cprefix)$(cwarn)
|
---|
39 | else
|
---|
40 | CFLAGS = $(defines) $(cinclude)
|
---|
41 | endif
|
---|
42 | #LDFLAGS = /deb
|
---|
43 | LDFLAGS =
|
---|
44 |
|
---|
45 | ifeq ($(CC),cc)
|
---|
46 | defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file")
|
---|
47 | else
|
---|
48 | ifeq ($(ARCH),VAX)
|
---|
49 | defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE","VAX")
|
---|
50 | else
|
---|
51 | defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE")
|
---|
52 | endif
|
---|
53 | endif
|
---|
54 |
|
---|
55 | LOAD_AVG = /define="NO_LDAV"
|
---|
56 |
|
---|
57 | # If you don't want archive support, comment these out.
|
---|
58 | ARCHIVES = ,ar.obj,arscan.obj
|
---|
59 | ARCHIVES_SRC = ar.c arscan.c
|
---|
60 |
|
---|
61 | # If your system needs extra libraries loaded in, define them here.
|
---|
62 | # System V probably need -lPW for alloca.
|
---|
63 | # if on vax, uncomment the following line
|
---|
64 | #LOADLIBES = ,c.opt/opt
|
---|
65 | ifeq ($(CC),cc)
|
---|
66 | #LOADLIBES =,sys$$library:vaxcrtl.olb/lib
|
---|
67 | CRT0 =
|
---|
68 | else
|
---|
69 | LOADLIBES =,gnu_cc_library:libgcc.olb/lib
|
---|
70 | endif
|
---|
71 |
|
---|
72 | # If your system doesn't have alloca, or the one provided is bad,
|
---|
73 | # get it from the Emacs distribution and define these.
|
---|
74 | #ALLOCA = ,alloca.obj
|
---|
75 | #ALLOCASRC = alloca.c
|
---|
76 |
|
---|
77 | # If there are remote execution facilities defined,
|
---|
78 | # enable them with switches here (see remote-*.c).
|
---|
79 | REMOTE =
|
---|
80 |
|
---|
81 | # Any extra object files your system needs.
|
---|
82 | extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
|
---|
83 | #,directory.obj
|
---|
84 | # as an alternative:
|
---|
85 | glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
---|
86 | getopt = ,getopt.obj,getopt1.obj
|
---|
87 | # Directory to install 'make' in.
|
---|
88 | bindir = []
|
---|
89 | # Directory to install the man page in.
|
---|
90 | mandir = []
|
---|
91 | # Number to put on the man page filename.
|
---|
92 | manext = 1
|
---|
93 |
|
---|
94 | guile = ,guile.obj
|
---|
95 |
|
---|
96 | objs = commands.obj,job.obj,output.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
---|
97 | load.obj,main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
---|
98 | default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
---|
99 | vpath.obj,version.obj,vms_progname.obj,vms_exit.obj,\
|
---|
100 | vms_export_symbol.obj$(guile)$(ARCHIVES)$(extras)$(getopt)$(glob)
|
---|
101 |
|
---|
102 | srcs = commands.c job.c output.c dir.c file.c misc.c guile.c hash.c \
|
---|
103 | load.c main.c read.c remake.c rule.c implicit.c \
|
---|
104 | default.c variable.c expand.c function.c strcache.c \
|
---|
105 | vpath.c version.c vmsfunctions.c vmsify.c vms_progname.c vms_exit.c \
|
---|
106 | vms_export_symbol.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
---|
107 | commands.h dep.h filedef.h job.h output.h makeint.h rule.h variable.h
|
---|
108 |
|
---|
109 |
|
---|
110 | .PHONY: all doc
|
---|
111 | all: config.h make.exe
|
---|
112 |
|
---|
113 | doc: make.info make.dvi
|
---|
114 |
|
---|
115 |
|
---|
116 | make.exe: $(objs)
|
---|
117 | $(LD)$(LDFLAGS)/exe=$@ $^$(LOADLIBES)$(CRT0)
|
---|
118 |
|
---|
119 | .PHONY: clean realclean
|
---|
120 | clean:
|
---|
121 | -purge [...]
|
---|
122 | -$(RM) make.exe;,*.obj;
|
---|
123 | -$(RM) [.glob]*.obj;
|
---|
124 |
|
---|
125 | ar.obj: ar.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h dep.h \
|
---|
126 | [.glob]fnmatch.h
|
---|
127 | arscan.obj: arscan.c makeint.h config.h gnumake.h gettext.h
|
---|
128 | commands.obj: commands.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
129 | hash.h dep.h variable.h job.h output.h commands.h
|
---|
130 | default.obj: default.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
131 | hash.h variable.h rule.h dep.h job.h output.h commands.h
|
---|
132 | dir.obj: dir.c makeint.h config.h gnumake.h gettext.h hash.h filedef.h \
|
---|
133 | dep.h [.glob]glob.h
|
---|
134 | expand.obj: expand.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
135 | hash.h job.h output.h commands.h variable.h rule.h
|
---|
136 | file.obj: file.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
---|
137 | dep.h job.h output.h commands.h variable.h debug.h
|
---|
138 | [.glob]fnmatch.obj: [.glob]fnmatch.c config.h [.glob]fnmatch.h
|
---|
139 | function.obj: function.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
140 | hash.h variable.h dep.h job.h output.h commands.h debug.h
|
---|
141 | getopt.obj: getopt.c config.h gettext.h getopt.h
|
---|
142 | getopt1.obj: getopt1.c config.h getopt.h
|
---|
143 | [.glob]glob.obj: [.glob]glob.c config.h [.glob]fnmatch.h [.glob]glob.h
|
---|
144 | guile.obj: guile.c makeint.h config.h gnumake.h gettext.h
|
---|
145 | hash.obj: hash.c makeint.h config.h gnumake.h gettext.h hash.h
|
---|
146 | implicit.obj: implicit.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
147 | hash.h rule.h dep.h debug.h variable.h job.h output.h commands.h
|
---|
148 | job.obj: job.c makeint.h config.h gnumake.h gettext.h job.h output.h debug.h \
|
---|
149 | filedef.h hash.h commands.h variable.h debug.h vmsjobs.c
|
---|
150 | load.obj: load.c makeint.h config.h gnumake.h gettext.h
|
---|
151 | main.obj: main.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
---|
152 | dep.h variable.h job.h output.h commands.h rule.h debug.h getopt.h
|
---|
153 | misc.obj: misc.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
---|
154 | dep.h debug.h
|
---|
155 | output.obj: output.c makeint.h config.h gnumake.h gettext.h job.h output.h
|
---|
156 | read.obj: read.c makeint.h config.h gnumake.h gettext.h [.glob]glob.h \
|
---|
157 | filedef.h hash.h dep.h job.h output.h commands.h variable.h rule.h \
|
---|
158 | debug.h
|
---|
159 | remake.obj: remake.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
160 | hash.h job.h output.h commands.h dep.h variable.h debug.h
|
---|
161 | remote-stub.obj: remote-stub.c makeint.h config.h gnumake.h gettext.h \
|
---|
162 | filedef.h hash.h job.h output.h commands.h
|
---|
163 | rule.obj: rule.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
---|
164 | dep.h job.h output.h commands.h variable.h rule.h
|
---|
165 | signame.obj: signame.c makeint.h config.h gnumake.h gettext.h
|
---|
166 | strcache.obj: strcache.c makeint.h config.h gnumake.h gettext.h hash.h
|
---|
167 | variable.obj: variable.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
---|
168 | hash.h dep.h job.h output.h commands.h variable.h rule.h
|
---|
169 | version.obj: version.c config.h
|
---|
170 | vmsfunctions.obj: vmsfunctions.c makeint.h config.h gnumake.h gettext.h \
|
---|
171 | debug.h job.h output.h vmsdir.h
|
---|
172 | vmsify.obj: vmsify.c
|
---|
173 | vpath.obj: vpath.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
---|
174 | variable.h
|
---|
175 | vms_progname.obj: vms_progname.c
|
---|
176 | vms_exit.obj: vms_exit.c
|
---|
177 | vms_export_symbol.obj: vms_export_symbol.c
|
---|
178 |
|
---|
179 | config.h: config.h-vms
|
---|
180 | $(CP) $< $@
|
---|