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