1 # -*-Makefile-*- for GNU make on Amiga 2 # 3 # NOTE: If you have no `make' program at all to process this makefile, run 4 # `build.sh' instead. 5 # 6 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 7 # 2005, 2006 Free Software Foundation, Inc. 8 # This file is part of GNU Make. 9 # 10 # GNU Make is free software; you can redistribute it and/or modify it under the 11 # terms of the GNU General Public License as published by the Free Software 12 # Foundation; either version 2, or (at your option) any later version. 13 # 14 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY 15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 16 # A PARTICULAR PURPOSE. See the GNU General Public License for more details. 17 # 18 # You should have received a copy of the GNU General Public License along with 19 # GNU Make; see the file COPYING. If not, write to the Free Software 20 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 22 # 23 # Makefile for GNU Make 24 # 25 26 CC = sc 27 RM = delete 28 29 CFLAGS = 30 CPPFLAGS = 31 LDFLAGS = 32 33 # Define these for your system as follows: 34 # -DNO_ARCHIVES To disable `ar' archive support. 35 # -DNO_FLOAT To avoid using floating-point numbers. 36 # -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2. 37 # Some compilers apparently accept this 38 # without complaint but produce losing code, 39 # so beware. 40 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline. 41 # See also `config.h'. 42 defines = 43 44 # Which flavor of remote job execution support to use. 45 # The code is found in `remote-$(REMOTE).c'. 46 REMOTE = stub 47 48 # If you are using the GNU C library, or have the GNU getopt functions in 49 # your C library, you can comment these out. 50 GETOPT = getopt.o getopt1.o 51 GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h 52 53 # If you are using the GNU C library, or have the GNU glob functions in 54 # your C library, you can comment this out. GNU make uses special hooks 55 # into the glob functions to be more efficient (by using make's directory 56 # cache for globbing), so you must use the GNU functions even if your 57 # system's C library has the 1003.2 glob functions already. Also, the glob 58 # functions in the AIX and HPUX C libraries are said to be buggy. 59 GLOB = glob/glob.lib 60 61 # If your system doesn't have alloca, or the one provided is bad, define this. 62 ALLOCA = alloca.o 63 ALLOCA_SRC = $(srcdir)alloca.c 64 65 # If your system needs extra libraries loaded in, define them here. 66 # System V probably need -lPW for alloca. HP-UX 7.0's alloca in 67 # libPW.a is broken on HP9000s300 and HP9000s400 machines. Use 68 # alloca.c instead on those machines. 69 LOADLIBES = 70 71 # Any extra object files your system needs. 72 extras = amiga.o 73 74 # Common prefix for machine-independent installed files. 75 prefix = 76 # Common prefix for machine-dependent installed files. 77 exec_prefix = 78 79 # Directory to install `make' in. 80 bindir = sc:c 81 # Directory to find libraries in for `-lXXX'. 82 libdir = lib: 83 # Directory to search by default for included makefiles. 84 includedir = include: 85 # Directory to install the Info files in. 86 infodir = doc: 87 # Directory to install the man page in. 88 mandir = t: 89 # Number to put on the man page filename. 90 manext = 1 91 # Prefix to put on installed `make' binary file name. 92 binprefix = 93 # Prefix to put on installed `make' man page file name. 94 manprefix = $(binprefix) 95 96 # Whether or not make needs to be installed setgid. 97 # The value should be either `true' or `false'. 98 # On many systems, the getloadavg function (used to implement the `-l' 99 # switch) will not work unless make is installed setgid kmem. 100 install_setgid = false 101 # Install make setgid to this group so it can read /dev/kmem. 102 group = sys 103 104 # Program to install `make'. 105 INSTALL_PROGRAM = copy 106 # Program to install the man page. 107 INSTALL_DATA = copy 108 # Generic install program. 109 INSTALL = copy 110 111 # Program to format Texinfo source into Info files. 112 MAKEINFO = makeinfo 113 # Program to format Texinfo source into DVI files. 114 TEXI2DVI = texi2dvi 115 116 # Programs to make tags files. 117 ETAGS = etags -w 118 CTAGS = ctags -w 119 120 objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \ 121 rule.o implicit.o default.o variable.o expand.o function.o \ 122 vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \ 123 remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras) 124 srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \ 125 $(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \ 126 $(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \ 127 $(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \ 128 $(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \ 129 $(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \ 130 $(srcdir)remote-$(REMOTE).c \ 131 $(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \ 132 $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \ 133 $(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \ 134 $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \ 135 $(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in 136 137 138 .SUFFIXES: 139 .SUFFIXES: .o .c .h .ps .dvi .info .texinfo 140 141 all: make 142 info: make.info 143 dvi: make.dvi 144 # Some makes apparently use .PHONY as the default goal if it is before `all'. 145 .PHONY: all check info dvi 146 147 make.info: make.texinfo 148 $(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info 149 150 make.dvi: make.texinfo 151 $(TEXI2DVI) $(srcdir)make.texinfo 152 153 make.ps: make.dvi 154 dvi2ps make.dvi > make.ps 155 156 make: $(objs) $(GLOB) 157 $(CC) Link $(LDFLAGS) $(objs) Lib $(GLOB) $(LOADLIBES) To make.new 158 -delete make 159 rename make.new make 160 161 TMPFILE = t:Make$$ 162 163 $(GLOB): 164 cd glob @@\ 165 $(MAKE) -$(MAKEFLAGS) -f Makefile 166 167 # -I. is needed to find config.h in the build directory. 168 OUTPUT_OPTION = 169 .c.o: 170 $(CC) $(defines) IDir "" IDir glob \ 171 $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) 172 173 # For some losing Unix makes. 174 SHELL = /bin/sh 175 #@SET_MAKE@ 176 177 glob/libglob.a: FORCE config.h 178 cd glob; $(MAKE) libglob.a 179 FORCE: 180 181 tagsrcs = $(srcs) $(srcdir)remote-*.c 182 183 .PHONY: install installdirs 184 install: installdirs \ 185 $(bindir)$(binprefix)make $(infodir)make.info \ 186 $(mandir)$(manprefix)make.$(manext) 187 188 installdirs: 189 $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir) 190 191 $(bindir)$(binprefix)make: make 192 $(INSTALL_PROGRAM) make $@.new 193 @if $(install_setgid); then \ 194 if chgrp $(group) $@.new && chmod g+s $@.new; then \ 195 echo "chgrp $(group) $@.new && chmod g+s $@.new"; \ 196 else \ 197 echo "$@ needs to be owned by group $(group) and setgid;"; \ 198 echo "otherwise the \`-l' option will probably not work."; \ 199 echo "You may need special privileges to install $@."; \ 200 fi; \ 201 else true; fi 202 # Some systems can't deal with renaming onto a running binary. 203 -$(RM) $@.old 204 -mv $@ $@.old 205 mv $@.new $@ 206 207 $(infodir)make.info: make.info 208 if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \ 209 for file in $${dir}/make.info*; do \ 210 name="`basename $$file`"; \ 211 $(INSTALL_DATA) $$file \ 212 `echo $@ | sed "s,make.info\$$,$$name,"`; \ 213 done 214 # Run install-info only if it exists. 215 # Use `if' instead of just prepending `-' to the 216 # line so we notice real errors from install-info. 217 # We use `$(SHELL) -c' because some shells do not 218 # fail gracefully when there is an unknown command. 219 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ 220 if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \ 221 install-info --infodir=$(infodir) $$dir/make.info; \ 222 else true; fi 223 224 $(mandir)$(manprefix)make.$(manext): make.man 225 $(INSTALL_DATA) $(srcdir)make.man $@ 226 227 228 loadavg: loadavg.c config.h 229 $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \ 230 loadavg.c $(LOADLIBES) -o $@ 231 # We copy getloadavg.c into a different file rather than compiling it 232 # directly because some compilers clobber getloadavg.o in the process. 233 loadavg.c: getloadavg.c 234 ln $(srcdir)getloadavg.c loadavg.c || \ 235 cp $(srcdir)getloadavg.c loadavg.c 236 check-loadavg: loadavg 237 @echo The system uptime program believes the load average to be: 238 -uptime 239 @echo The GNU load average checking code believes: 240 ./loadavg 241 check: check-loadavg 242 243 244 .PHONY: clean realclean distclean mostlyclean 245 clean: glob-clean 246 -$(RM) make loadavg "#?.o" core make.dvi 247 248 distclean: clean glob-realclean 249 -$(RM) Makefile config.h config.status build.sh 250 -$(RM) config.log config.cache 251 -$(RM) TAGS tags 252 -$(RM) make.?? make.??s make.log make.toc make.*aux 253 -$(RM) loadavg.c 254 255 realclean: distclean 256 -$(RM) make.info* 257 mostlyclean: clean 258 259 .PHONY: glob-clean glob-realclean 260 glob-clean glob-realclean: 261 cd glob @@\ 262 $(MAKE) $@ 263 264 # This tells versions [3.59,3.63) of GNU make not to export all variables. 265 .NOEXPORT: 266 267 # The automatically generated dependencies below may omit config.h 268 # because it is included with ``#include <config.h>'' rather than 269 # ``#include "config.h"''. So we add the explicit dependency to make sure. 270 $(objs): config.h 271 272 # Automatically generated dependencies will be put at the end of the file. 273 274 # Automatically generated dependencies. 275 commands.o: commands.c make.h dep.h filedef.h variable.h job.h \ 276 commands.h 277 job.o: job.c make.h job.h filedef.h commands.h variable.h 278 dir.o: dir.c make.h 279 file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h 280 misc.o: misc.c make.h dep.h 281 main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \ 282 getopt.h 283 read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \ 284 glob/glob.h 285 remake.o: remake.c make.h filedef.h job.h commands.h dep.h 286 rule.o: rule.c make.h dep.h filedef.h job.h commands.h variable.h \ 287 rule.h 288 implicit.o: implicit.c make.h rule.h dep.h filedef.h 289 default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \ 290 variable.h 291 variable.o: variable.c make.h dep.h filedef.h job.h commands.h \ 292 variable.h 293 expand.o: expand.c make.h filedef.h job.h commands.h variable.h 294 function.o: function.c make.h filedef.h variable.h dep.h job.h \ 295 commands.h amiga.h 296 vpath.o: vpath.c make.h filedef.h variable.h 297 strcache.o: strcache.c make.h hash.h 298 version.o: version.c 299 ar.o: ar.c make.h filedef.h dep.h 300 arscan.o: arscan.c make.h 301 signame.o: signame.c signame.h 302 remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h 303 getopt.o: getopt.c 304 getopt1.o : getopt1.c getopt.h 305 getloadavg.o: getloadavg.c 306 amiga.o: amiga.c make.h variable.h amiga.h 307