source: git/factory/GNUmakefile.in @ 96992c

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