source: git/factory/GNUmakefile.in @ 368602a

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