source: git/factory/GNUmakefile.in @ 6c44098

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