source: git/factory/GNUmakefile.in @ 769f28

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