source: git/factory/GNUmakefile.in @ ab547e2

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