source: git/factory/GNUmakefile.in @ 2f19b0

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