1 | # @configure_input@ |
---|
2 | # $Id: GNUmakefile.in,v 1.30 1998-03-10 14:53:10 schmidt Exp $ |
---|
3 | |
---|
4 | # |
---|
5 | # GNUmakefile.in - used by `configure' to create `GNUmakefile', the |
---|
6 | # top level makefile for Factory. |
---|
7 | # |
---|
8 | # In general, you should let `configure' guess the correct values |
---|
9 | # for the variables below. But if something seriously goes wrong |
---|
10 | # in configuring, please inform the authors and feel free to |
---|
11 | # edit the marked section. |
---|
12 | # |
---|
13 | # See the `INSTALL' file for information on how to build Factory. |
---|
14 | # |
---|
15 | # Note: Use GNU `make' (`gmake') to make with this makefile. |
---|
16 | # |
---|
17 | |
---|
18 | ############### START OF CONFIGURABLE SECTION ############### |
---|
19 | |
---|
20 | SHELL = /bin/sh |
---|
21 | |
---|
22 | # |
---|
23 | # - versions. Do not change version here !!! |
---|
24 | # |
---|
25 | version = @factory_version@ |
---|
26 | distname = factory-$(version) |
---|
27 | |
---|
28 | # |
---|
29 | # - paths. |
---|
30 | # |
---|
31 | prefix = @prefix@ |
---|
32 | exec_prefix = @exec_prefix@ |
---|
33 | libdir = @libdir@ |
---|
34 | datadir = @datadir@ |
---|
35 | gftabledir = @gftabledir@ |
---|
36 | includedir = @includedir@ |
---|
37 | templatedir = @templatedir@ |
---|
38 | |
---|
39 | srcdir = @srcdir@ |
---|
40 | VPATH = @srcdir@ |
---|
41 | |
---|
42 | # |
---|
43 | # - the name of the game. |
---|
44 | # |
---|
45 | libfactory = @libfactory@ |
---|
46 | |
---|
47 | # |
---|
48 | # - programs. |
---|
49 | # |
---|
50 | CC = @CC@ |
---|
51 | CXX = @CXX@ |
---|
52 | # seems configure sometimes finds non-BSD install, so we better |
---|
53 | # hardcode path to our install-sh |
---|
54 | INSTALL = $(srcdir)/bin/install-sh -c |
---|
55 | INSTALL_DATA = @INSTALL_DATA@ |
---|
56 | INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
---|
57 | RANLIB = @RANLIB@ |
---|
58 | |
---|
59 | LN_S = @LN_S@ |
---|
60 | AR = @AR@ |
---|
61 | BISON = @BISON@ |
---|
62 | MKINSTALLDIRS = @MKINSTALLDIRS@ |
---|
63 | MAKEHEADER = @MAKEHEADER@ |
---|
64 | |
---|
65 | # |
---|
66 | # - flags. |
---|
67 | # |
---|
68 | CFLAGS = @CFLAGS@ |
---|
69 | CPPFLAGS = @CPPFLAGS@ |
---|
70 | CXXFLAGS = @CXXFLAGS@ |
---|
71 | DEFS = @DEFS@ |
---|
72 | LDFLAGS = @LDFLAGS@ |
---|
73 | LIBS = @LIBS@ |
---|
74 | |
---|
75 | ARFLAGS = @ARFLAGS@ |
---|
76 | MAKEHEADERFLAGS=@MAKEHEADERFLAGS@ |
---|
77 | |
---|
78 | # |
---|
79 | # - some other variables. |
---|
80 | # |
---|
81 | factorysrc = @factorysrc@ |
---|
82 | factoryincl = @factoryincl@ |
---|
83 | memmansrc = @memmansrc@ |
---|
84 | memmanincl = @memmanincl@ |
---|
85 | |
---|
86 | alltargets = @alltargets@ |
---|
87 | installtargets =@installtargets@ |
---|
88 | uninstalltargets=@uninstalltargets@ |
---|
89 | |
---|
90 | ############### END OF CONFIGURABLE SECTION ############### |
---|
91 | |
---|
92 | # |
---|
93 | # - compiler flags. |
---|
94 | # |
---|
95 | WARNFLAGS = -w |
---|
96 | |
---|
97 | # flags to translate library c files |
---|
98 | LIBCFLAGS = $(WARNFLAGS) \ |
---|
99 | -I. -I$(srcdir) \ |
---|
100 | $(DEFS) $(CPPFLAGS) $(CFLAGS) |
---|
101 | |
---|
102 | # flags to translate library c++ files |
---|
103 | LIBCXXFLAGS = $(WARNFLAGS) -fno-implicit-templates \ |
---|
104 | -I. -I$(srcdir) \ |
---|
105 | $(DEFS) $(CPPFLAGS) $(CXXFLAGS) |
---|
106 | |
---|
107 | # flags to translate ftmpl_inst.cc |
---|
108 | TMPLCXXFLAGS = $(LIBCXXFLAGS) |
---|
109 | |
---|
110 | # flags to link test programs |
---|
111 | TESTCXXFLAGS = $(LIBCXXFLAGS) |
---|
112 | |
---|
113 | # flags to link test programs |
---|
114 | TESTLDFLAGS = $(LIBS) $(LDFLAGS) |
---|
115 | |
---|
116 | # flags to create dependency lists |
---|
117 | DEPCXXFLAGS = -I. -I$(srcdir) \ |
---|
118 | $(DEFS) $(CPPFLAGS) |
---|
119 | |
---|
120 | # |
---|
121 | # - source files. |
---|
122 | # |
---|
123 | |
---|
124 | # factory source files |
---|
125 | basefactorysrc := \ |
---|
126 | canonicalform.cc \ |
---|
127 | cf_algorithm.cc \ |
---|
128 | cf_binom.cc \ |
---|
129 | cf_char.cc \ |
---|
130 | cf_chinese.cc \ |
---|
131 | cf_eval.cc \ |
---|
132 | cf_factor.cc \ |
---|
133 | cf_factory.cc \ |
---|
134 | cf_gcd.cc \ |
---|
135 | cf_generator.cc \ |
---|
136 | cf_globals.cc \ |
---|
137 | cf_irred.cc \ |
---|
138 | cf_iter.cc \ |
---|
139 | cf_linsys.cc \ |
---|
140 | cf_map.cc \ |
---|
141 | cf_ops.cc \ |
---|
142 | cf_primes.cc \ |
---|
143 | cf_random.cc \ |
---|
144 | cf_resultant.cc \ |
---|
145 | cf_reval.cc \ |
---|
146 | cf_switches.cc \ |
---|
147 | cf_util.cc \ |
---|
148 | debug.cc \ |
---|
149 | fac_berlekamp.cc \ |
---|
150 | fac_cantzass.cc \ |
---|
151 | fac_distrib.cc \ |
---|
152 | fac_ezgcd.cc \ |
---|
153 | fac_iterfor.cc \ |
---|
154 | fac_multihensel.cc \ |
---|
155 | fac_multivar.cc \ |
---|
156 | fac_sqrfree.cc \ |
---|
157 | fac_univar.cc \ |
---|
158 | fac_util.cc \ |
---|
159 | ffops.cc \ |
---|
160 | gf_tabutil.cc \ |
---|
161 | gfops.cc \ |
---|
162 | initgmp.cc \ |
---|
163 | int_cf.cc \ |
---|
164 | int_int.cc \ |
---|
165 | int_poly.cc \ |
---|
166 | int_pp.cc \ |
---|
167 | int_rat.cc \ |
---|
168 | sm_sparsemod.cc \ |
---|
169 | sm_util.cc \ |
---|
170 | variable.cc |
---|
171 | singfactorysrc := \ |
---|
172 | singext.cc |
---|
173 | useiofactorysrc := \ |
---|
174 | parseutil.cc \ |
---|
175 | readcf.y |
---|
176 | distfactorysrc := \ |
---|
177 | $(basefactorysrc) \ |
---|
178 | $(singfactorysrc) \ |
---|
179 | $(useiofactorysrc) |
---|
180 | |
---|
181 | # factory object files and dependencies |
---|
182 | factoryobj := $(factorysrc:.cc=.o) |
---|
183 | factoryobj := $(factoryobj:.y=.o) |
---|
184 | factorydep := $(factorysrc:.cc=.d) |
---|
185 | factorydep := $(factorydep:.y=.d) |
---|
186 | |
---|
187 | # factory header files |
---|
188 | basefactoryincl := \ |
---|
189 | assert.h \ |
---|
190 | canonicalform.h \ |
---|
191 | cf_algorithm.h \ |
---|
192 | cf_binom.h \ |
---|
193 | cf_defs.h \ |
---|
194 | cf_eval.h \ |
---|
195 | cf_factory.h \ |
---|
196 | cf_generator.h \ |
---|
197 | cf_globals.h \ |
---|
198 | cf_gmp.h \ |
---|
199 | cf_irred.h \ |
---|
200 | cf_iter.h \ |
---|
201 | cf_map.h \ |
---|
202 | cf_primes.h \ |
---|
203 | cf_primetab.h \ |
---|
204 | cf_random.h \ |
---|
205 | cf_reval.h \ |
---|
206 | cf_switches.h \ |
---|
207 | cf_util.h \ |
---|
208 | debug.h \ |
---|
209 | fac_berlekamp.h \ |
---|
210 | fac_cantzass.h \ |
---|
211 | fac_distrib.h \ |
---|
212 | fac_iterfor.h \ |
---|
213 | fac_multivar.h \ |
---|
214 | fac_sqrfree.h \ |
---|
215 | fac_univar.h \ |
---|
216 | fac_util.h \ |
---|
217 | ffops.h \ |
---|
218 | ftmpl_array.h \ |
---|
219 | ftmpl_factor.h \ |
---|
220 | ftmpl_functions.h \ |
---|
221 | ftmpl_list.h \ |
---|
222 | ftmpl_matrix.h \ |
---|
223 | gf_tabutil.h \ |
---|
224 | gfops.h \ |
---|
225 | gmpext.h \ |
---|
226 | imm.h \ |
---|
227 | int_cf.h \ |
---|
228 | int_int.h \ |
---|
229 | int_poly.h \ |
---|
230 | int_pp.h \ |
---|
231 | int_rat.h \ |
---|
232 | sm_sparsemod.h \ |
---|
233 | sm_util.h \ |
---|
234 | timing.h \ |
---|
235 | variable.h |
---|
236 | singfactoryincl := \ |
---|
237 | singext.h |
---|
238 | useiofactoryincl := \ |
---|
239 | parseutil.h |
---|
240 | distfactoryincl := \ |
---|
241 | $(basefactoryincl) \ |
---|
242 | $(singfactoryincl) \ |
---|
243 | $(useiofactoryincl) |
---|
244 | |
---|
245 | # memory manager source files |
---|
246 | basememmansrc := \ |
---|
247 | newdelete.cc |
---|
248 | newmemmansrc := \ |
---|
249 | mmalloc.c \ |
---|
250 | mmallocb.c \ |
---|
251 | mmallocs.c \ |
---|
252 | mmblock.c \ |
---|
253 | mmheap.c \ |
---|
254 | mminit.c \ |
---|
255 | mmspec.c \ |
---|
256 | mmutil.c |
---|
257 | oldmemmansrc := \ |
---|
258 | memutil.c |
---|
259 | distmemmansrc := \ |
---|
260 | $(basememmansrc) \ |
---|
261 | $(newmemmansrc) \ |
---|
262 | $(oldmemmansrc) |
---|
263 | |
---|
264 | # memory manager object files and dependencies |
---|
265 | memmanobj := $(memmansrc:.cc=.o) |
---|
266 | memmanobj := $(memmanobj:.c=.o) |
---|
267 | memmandep := $(memmansrc:.cc=.d) |
---|
268 | memmandep := $(memmandep:.c=.d) |
---|
269 | |
---|
270 | # memory manager header files |
---|
271 | newmemmanincl := \ |
---|
272 | mmprivate.h \ |
---|
273 | memman.h |
---|
274 | oldmemmanincl := \ |
---|
275 | memutil.h |
---|
276 | distmemmanincl := \ |
---|
277 | $(newmemmanincl) \ |
---|
278 | $(oldmemmanincl) |
---|
279 | |
---|
280 | # factory template files |
---|
281 | templatesrc := \ |
---|
282 | ftmpl_array.cc \ |
---|
283 | ftmpl_factor.cc \ |
---|
284 | ftmpl_functions.h \ |
---|
285 | ftmpl_list.cc \ |
---|
286 | ftmpl_matrix.cc |
---|
287 | templateincl := \ |
---|
288 | ftmpl_array.h \ |
---|
289 | ftmpl_factor.h \ |
---|
290 | ftmpl_list.h \ |
---|
291 | ftmpl_matrix.h |
---|
292 | |
---|
293 | # header templates |
---|
294 | hdrtemplsrc := \ |
---|
295 | factoryconf.template \ |
---|
296 | factory.template |
---|
297 | hdrtempldep := $(hdrtemplsrc:.template=.d) |
---|
298 | |
---|
299 | # FTE source files |
---|
300 | ftestsrc := \ |
---|
301 | ftest_io.cc \ |
---|
302 | ftest_util.cc |
---|
303 | |
---|
304 | # FTE header files |
---|
305 | ftestincl := \ |
---|
306 | ftest_io.h \ |
---|
307 | ftest_util.h |
---|
308 | |
---|
309 | # FTE m4 source files (exported for `GNUmakefile' in `ftest/'). |
---|
310 | # This variable may be already initialized from the development |
---|
311 | # `GNUmakefile'. |
---|
312 | ftestm4src := $(ftestm4src) \ |
---|
313 | degree.m4 \ |
---|
314 | deriv.m4 \ |
---|
315 | factorize.m4 \ |
---|
316 | fbinops.m4 \ |
---|
317 | feval.m4 \ |
---|
318 | gcd.m4 \ |
---|
319 | insert.m4 \ |
---|
320 | resultant.m4 \ |
---|
321 | size.m4 \ |
---|
322 | totaldegree.m4 |
---|
323 | export ftestm4src |
---|
324 | |
---|
325 | # other files from the FTE |
---|
326 | ftestdistfiles := \ |
---|
327 | ChangeLog \ |
---|
328 | GNUmakefile.in \ |
---|
329 | ftest_util.m4 |
---|
330 | |
---|
331 | # FTE executables |
---|
332 | ftestexec := $(ftestm4src:.m4=) |
---|
333 | |
---|
334 | # all the C/C++ source files in the distribution |
---|
335 | distsrc := \ |
---|
336 | $(distfactorysrc) $(distmemmansrc) \ |
---|
337 | $(addprefix templates/,$(templatesrc)) \ |
---|
338 | $(addprefix ftest/,$(ftestsrc)) \ |
---|
339 | readcf.cc ftmpl_inst.cc \ |
---|
340 | gengftables.cc test_install.cc |
---|
341 | |
---|
342 | # all the C/C++ include files in the distribution |
---|
343 | distincl := \ |
---|
344 | $(distfactoryincl) $(distmemmanincl) \ |
---|
345 | $(addprefix templates/,$(templateincl)) \ |
---|
346 | $(addprefix ftest/,$(ftestincl)) |
---|
347 | |
---|
348 | # all files for the Windows NT environment |
---|
349 | distntfiles := \ |
---|
350 | config.h nt.mak \ |
---|
351 | factory.h factoryconf.h \ |
---|
352 | INSTALL.nt |
---|
353 | |
---|
354 | # all files in the distribution |
---|
355 | distfiles := \ |
---|
356 | $(distsrc) $(distincl) $(hdrtemplsrc) \ |
---|
357 | $(addprefix ftest/,$(ftestm4src)) \ |
---|
358 | $(addprefix ftest/,$(ftestdistfiles)) \ |
---|
359 | GNUmakefile.in configure.in config.h.in configure \ |
---|
360 | ChangeLog README NEWS INSTALL \ |
---|
361 | $(addprefix winnt/,$(distntfiles)) \ |
---|
362 | examples/GNUmakefile examples/application.cc \ |
---|
363 | examples/factorize.cc examples/gcd.cc \ |
---|
364 | bin/folding.el bin/fold-docu.el \ |
---|
365 | bin/install-sh bin/mkinstalldirs \ |
---|
366 | bin/makeheader bin/makeheader.pl |
---|
367 | |
---|
368 | # |
---|
369 | # - phony targets. |
---|
370 | # |
---|
371 | .PHONY: all cf mem dist depend \ |
---|
372 | clean mostlyclean distclean maintainer-clean \ |
---|
373 | install installcf installmem installgftables installtest \ |
---|
374 | uninstall uninstallcf uninstallmem uninstallgftables \ |
---|
375 | ftestall ftestclean ftestdistclean |
---|
376 | |
---|
377 | # we make these targets phony to make sure that they are |
---|
378 | # up to date when a new distribution is built |
---|
379 | .PHONY: $(srcdir)/winnt/factory.h $(srcdir)/winnt/factoryconf.h |
---|
380 | |
---|
381 | # |
---|
382 | # - pattern rules. |
---|
383 | # |
---|
384 | |
---|
385 | # how to create library objets |
---|
386 | %.o: %.cc config.h |
---|
387 | $(CXX) -c $< $(LIBCXXFLAGS) -o $@ |
---|
388 | %.o: %.c config.h |
---|
389 | $(CC) -c $< $(LIBCFLAGS) -o $@ |
---|
390 | |
---|
391 | # how to create dependency files. To avoid broken dependency files |
---|
392 | # (which in turn break this GNUmakefile) we first generate them in |
---|
393 | # a temporary file which we then move to the destination file. |
---|
394 | %.d: %.cc factoryconf.h config.h |
---|
395 | echo $@ "\\" > $@tmp |
---|
396 | $(CXX) -MM $< $(DEPCXXFLAGS) >> $@tmp |
---|
397 | mv $@tmp $@ |
---|
398 | %.d: %.c factoryconf.h config.h |
---|
399 | echo $@ "\\" > $@tmp |
---|
400 | $(CXX) -MM $< $(DEPCXXFLAGS) >> $@tmp |
---|
401 | mv $@tmp $@ |
---|
402 | %.d: %.template |
---|
403 | echo $@ $(@:.d=.h) : "\\" > $@tmp |
---|
404 | sed -n '/^\/\*MAKEHEADER/!d; n; s/^#include "//; s/"//; p;' $< | tr '\012' ' ' >> $@tmp |
---|
405 | echo >> $@tmp |
---|
406 | mv $@tmp $@ |
---|
407 | |
---|
408 | # how to create header files from header templates |
---|
409 | %.h: %.template |
---|
410 | $(MAKEHEADER) $(MAKEHEADERFLAGS) $< $@ |
---|
411 | |
---|
412 | # |
---|
413 | # - building factory. |
---|
414 | # |
---|
415 | all: $(alltargets) |
---|
416 | |
---|
417 | cf: factoryconf.h factory.h $(libfactory) |
---|
418 | |
---|
419 | mem: libcfmem.a |
---|
420 | |
---|
421 | # |
---|
422 | # - explicit targets. |
---|
423 | # |
---|
424 | $(libfactory): $(factoryobj) |
---|
425 | $(AR) $(ARFLAGS) $@ $^ |
---|
426 | $(RANLIB) $@ |
---|
427 | |
---|
428 | libcfmem.a: $(memmanobj) |
---|
429 | $(AR) $(ARFLAGS) $@ $^ |
---|
430 | $(RANLIB) $@ |
---|
431 | |
---|
432 | ftmpl_inst.o: ftmpl_inst.cc factoryconf.h factory.h \ |
---|
433 | $(addprefix templates/,$(templatesrc)) \ |
---|
434 | $(addprefix templates/,$(templateincl)) |
---|
435 | $(CXX) -c $< $(TMPLCXXFLAGS) -o $@ |
---|
436 | |
---|
437 | # note that this is a non-source file which is distributed! |
---|
438 | $(srcdir)/readcf.cc: readcf.y |
---|
439 | $(BISON) $< -o $@ |
---|
440 | |
---|
441 | # note that these are non-source file which are distributed! |
---|
442 | # We do not specify any dependencies except the most important ones. |
---|
443 | $(srcdir)/winnt/factory.h: factory.template |
---|
444 | $(MAKEHEADER) $(MAKEHEADERFLAGS) $< $@ |
---|
445 | $(srcdir)/winnt/factoryconf.h: factoryconf.template winnt/config.h |
---|
446 | $(MAKEHEADER) -I$(srcdir)/winnt $(MAKEHEADERFLAGS) $< $@ |
---|
447 | |
---|
448 | # specify dependency in case user does not 'make depend' |
---|
449 | factoryconf.h: config.h |
---|
450 | |
---|
451 | TAGS: |
---|
452 | etags $(addprefix $(srcdir)/, $(distsrc) $(distincl)) |
---|
453 | |
---|
454 | # check configuration before building executables |
---|
455 | conftest: |
---|
456 | @if test -z "$(filter mem,$(alltargets))" \ |
---|
457 | || test -z "$(filter readcf.y,$(factorysrc))" \ |
---|
458 | || test -n "$(filter singext.cc,$(factorysrc))"; then \ |
---|
459 | echo "To make this target you have to configure"; \ |
---|
460 | echo "\`--without-Singular --with-memman --enable-streamio'."; \ |
---|
461 | exit 1; \ |
---|
462 | fi |
---|
463 | |
---|
464 | # |
---|
465 | # - Factory Test Environment. |
---|
466 | # |
---|
467 | $(ftestexec): conftest factoryconf.h factory.h libcf.a libcfmem.a ftmpl_inst.o |
---|
468 | cd ftest && $(MAKE) $@ |
---|
469 | @if test -r "$@"; then \ |
---|
470 | :; \ |
---|
471 | else \ |
---|
472 | echo "$(LN_S) ftest/$@ $@"; \ |
---|
473 | $(LN_S) ftest/$@ $@; \ |
---|
474 | fi |
---|
475 | |
---|
476 | ftestall: $(ftestexec) |
---|
477 | |
---|
478 | ftestclean: |
---|
479 | -cd ftest && $(MAKE) clean |
---|
480 | |
---|
481 | ftestdistclean: |
---|
482 | -cd ftest && $(MAKE) distclean |
---|
483 | -rmdir ftest |
---|
484 | |
---|
485 | # |
---|
486 | # - GF(q) table generation. |
---|
487 | # |
---|
488 | |
---|
489 | # these are not all dependencies, but the most important ones |
---|
490 | gengftables.o: gengftables.cc conftest factory.h gf_tabutil.h |
---|
491 | $(CXX) -c $< $(TESTCXXFLAGS) -o $@ |
---|
492 | |
---|
493 | gengftables: gengftables.o libcf.a libcfmem.a ftmpl_inst.o |
---|
494 | $(CXX) $^ $(TESTLDFLAGS) -o $@ |
---|
495 | |
---|
496 | gftables: gengftables |
---|
497 | @echo "This command will take quite a long time to execute;" |
---|
498 | @echo "maybe you want to get the tables directly via ftp (see" |
---|
499 | @echo "the INSTALL file)." |
---|
500 | $(MKINSTALLDIRS) gftables |
---|
501 | ./gengftables |
---|
502 | |
---|
503 | # |
---|
504 | # - installation test program. |
---|
505 | # |
---|
506 | |
---|
507 | # compile installation test program. do not look up |
---|
508 | # header files in current directory or in $(srcdir), but use |
---|
509 | # the header files from the directory where they should be |
---|
510 | # after installation. |
---|
511 | test_install.o: test_install.cc |
---|
512 | $(CXX) -c $< $(TESTCXXFLAGS) -I- -I$(includedir) -o $@ |
---|
513 | |
---|
514 | # the same we do for ftmpl_inst.o which for this reason is named |
---|
515 | # iftmpl_inst.o |
---|
516 | iftmpl_inst.o: |
---|
517 | $(CXX) -c $(templatedir)/ftmpl_inst.cc $(TMPLCXXFLAGS) -I- -I$(includedir) -o $@ |
---|
518 | |
---|
519 | # link installation test program |
---|
520 | test_install: test_install.o iftmpl_inst.o |
---|
521 | $(CXX) $^ -L$(libdir) -lcf -lcfmem $(TESTLDFLAGS) -o $@ |
---|
522 | |
---|
523 | installtest: test_install |
---|
524 | @-if ./test_install; then \ |
---|
525 | echo "Installation seems ok."; \ |
---|
526 | else \ |
---|
527 | echo "Please check path of your GF(q) tables in config.h."; \ |
---|
528 | fi |
---|
529 | |
---|
530 | # |
---|
531 | # - install targets. |
---|
532 | # |
---|
533 | install: $(installtargets) |
---|
534 | |
---|
535 | installcf: cf |
---|
536 | $(MKINSTALLDIRS) $(libdir) |
---|
537 | $(MKINSTALLDIRS) $(includedir) |
---|
538 | $(MKINSTALLDIRS) $(templatedir) |
---|
539 | $(INSTALL_DATA) $(libfactory) $(libdir)/$(libfactory) |
---|
540 | $(INSTALL_DATA) factory.h $(includedir)/factory.h |
---|
541 | $(INSTALL_DATA) factoryconf.h $(includedir)/factoryconf.h |
---|
542 | $(INSTALL_DATA) $(srcdir)/ftmpl_inst.cc $(templatedir)/ftmpl_inst.cc |
---|
543 | for file in $(templatesrc) $(templateincl); do \ |
---|
544 | $(INSTALL_DATA) $(srcdir)/templates/$$file $(templatedir)/$$file; \ |
---|
545 | done |
---|
546 | # we run `ranlib' another time for SUN machines |
---|
547 | $(RANLIB) $(libdir)/$(libfactory) |
---|
548 | |
---|
549 | installmem: mem |
---|
550 | $(MKINSTALLDIRS) $(libdir) |
---|
551 | $(INSTALL_DATA) libcfmem.a $(libdir)/libcfmem.a |
---|
552 | # once again: another run for SUN |
---|
553 | $(RANLIB) $(libdir)/libcfmem.a |
---|
554 | |
---|
555 | # to a pity, this cannot be done automatically ... |
---|
556 | installgftables: |
---|
557 | @echo "Copying GF(q) tables ..." |
---|
558 | @if test -d gftables; then \ |
---|
559 | $(MKINSTALLDIRS) $(gftabledir); \ |
---|
560 | for file in gftables/gftable.*.*; do \ |
---|
561 | $(INSTALL_DATA) $$file $(gftabledir); \ |
---|
562 | done \ |
---|
563 | elif test -d "$(srcdir)"/gftables; then \ |
---|
564 | $(MKINSTALLDIRS) $(gftabledir); \ |
---|
565 | for file in "$(srcdir)"/gftables/gftable.*.*; do \ |
---|
566 | $(INSTALL_DATA) $$file $(gftabledir); \ |
---|
567 | done \ |
---|
568 | else \ |
---|
569 | echo "Run 'make gftables' before installing them"; \ |
---|
570 | exit 1; \ |
---|
571 | fi |
---|
572 | |
---|
573 | # |
---|
574 | # - uninstall targets. |
---|
575 | # |
---|
576 | uninstall: $(uninstalltargets) |
---|
577 | |
---|
578 | uninstallcf: |
---|
579 | -for file in $(templatesrc) $(templateincl); do \ |
---|
580 | rm -f $(templatedir)/$$file; \ |
---|
581 | done |
---|
582 | -rm -f $(templatedir)/ftmpl_inst.cc |
---|
583 | -rm -f $(includedir)/factoryconf.h |
---|
584 | -rm -f $(includedir)/factory.h |
---|
585 | -rm -f $(libdir)/$(libfactory) |
---|
586 | -rmdir $(templatedir) |
---|
587 | -rmdir $(includedir) |
---|
588 | -rmdir $(libdir) |
---|
589 | |
---|
590 | uninstallmem: |
---|
591 | -rm -f $(libdir)/libcfmem.a |
---|
592 | -rmdir $(libdir) |
---|
593 | |
---|
594 | uninstallgftables: |
---|
595 | -rm -f $(gftabledir)/gftable.*.* |
---|
596 | -rmdir $(gftabledir) |
---|
597 | |
---|
598 | # |
---|
599 | # - building a distribution. |
---|
600 | # |
---|
601 | dist: $(srcdir)/readcf.cc $(srcdir)/configure \ |
---|
602 | $(srcdir)/winnt/factory.h $(srcdir)/winnt/factoryconf.h |
---|
603 | rm -f $(distname).tgz |
---|
604 | rm -rf $(distname) |
---|
605 | $(MKINSTALLDIRS) $(distname)/bin |
---|
606 | $(MKINSTALLDIRS) $(distname)/examples |
---|
607 | $(MKINSTALLDIRS) $(distname)/ftest |
---|
608 | $(MKINSTALLDIRS) $(distname)/winnt |
---|
609 | $(MKINSTALLDIRS) $(distname)/templates |
---|
610 | @echo "Copying files to distribution directory ..." |
---|
611 | @for file in $(distfiles); do \ |
---|
612 | ln $(srcdir)/$$file $(distname)/$$file; \ |
---|
613 | done |
---|
614 | tar cf $(distname).tar $(distname) |
---|
615 | gzip $(distname).tar |
---|
616 | mv $(distname).tar.gz $(distname).tgz |
---|
617 | |
---|
618 | # |
---|
619 | # - cleaning up. |
---|
620 | # |
---|
621 | clean: ftestclean |
---|
622 | -rm -f $(libfactory) libcfmem.a \ |
---|
623 | $(ftestexec) gengftables test_install \ |
---|
624 | factoryconf.h factory.h *.o *.d *.dtmp |
---|
625 | |
---|
626 | # remove gftables only if we built them |
---|
627 | mostlyclean: clean |
---|
628 | -rm -f TAGS |
---|
629 | -if test ! -f gftables/README; then \ |
---|
630 | rm -rf gftables; \ |
---|
631 | fi |
---|
632 | |
---|
633 | distclean: ftestdistclean mostlyclean |
---|
634 | -rm -f $(distname).tgz GNUmakefile stamp-h \ |
---|
635 | config.cache config.log config.status config.h |
---|
636 | -rm -rf $(distname) |
---|
637 | |
---|
638 | maintainer-clean: distclean |
---|
639 | @echo "This command is intended for maintainers to use;" |
---|
640 | @echo "it deletes files that require bison to rebuild." |
---|
641 | -rm -f $(srcdir)/readcf.cc |
---|
642 | |
---|
643 | # |
---|
644 | # - dependencies. |
---|
645 | # |
---|
646 | # Do not generate them automatically if there are not any |
---|
647 | # dependencies at all. this trick saves some time when you do |
---|
648 | # not want to compile but do some maintenance which do not |
---|
649 | # require the dependencies. say 'make depend' to create the |
---|
650 | # dependencies explicitly. |
---|
651 | # |
---|
652 | depend: $(factorydep) $(memmandep) $(hdrtempldep) |
---|
653 | |
---|
654 | ifneq ($(wildcard *.d),) |
---|
655 | include $(factorydep) $(memmandep) $(hdrtempldep) |
---|
656 | endif |
---|
657 | |
---|
658 | # |
---|
659 | # - configure stuff. |
---|
660 | # |
---|
661 | $(srcdir)/configure: configure.in |
---|
662 | -cd $(srcdir) && autoconf |
---|
663 | |
---|
664 | # seems gmake needs at least a trivial command. otherwise all |
---|
665 | # files which depend on config.h will be remade even if congig.h |
---|
666 | # did not change. |
---|
667 | config.h: stamp-h |
---|
668 | @: |
---|
669 | |
---|
670 | stamp-h: config.h.in config.status |
---|
671 | CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status |
---|
672 | echo timestamp > stamp-h |
---|
673 | |
---|
674 | GNUmakefile: GNUmakefile.in config.status |
---|
675 | CONFIG_FILES=GNUmakefile CONFIG_HEADERS= ./config.status |
---|
676 | |
---|
677 | ftest/GNUmakefile: ftest/GNUmakefile.in config.status |
---|
678 | CONFIG_FILES=ftest/GNUmakefile CONFIG_HEADERS= ./config.status |
---|
679 | |
---|
680 | config.status: configure |
---|
681 | ./config.status --recheck |
---|