source: git/factory/GNUmakefile.in @ da68804

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