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

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