source: git/factory/GNUmakefile.in @ 5e5156

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