source: git/factory/libfac/Makefile.dist @ 6ce030f

jengelh-datetimespielwiese
Last change on this file since 6ce030f was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • Property mode set to 100644
File size: 4.5 KB
Line 
1#################################################
2factoryversion = 1.2b
3factorypath = ../factory/$(factoryversion)
4RM = /bin/rm -f
5MV = /bin/mv
6AR = ar cr
7RANLIB = ranlib
8LIBPREFX = libfac
9OPTMARK =
10LIBFAC = $(LIBPREFIX)$(OPTMARK).a
11LIBFAC-G = $(LIBPREFIX)-g$(OPTMARK).a
12SINGLIBFAC = libsingfac$(OPTMARK).a
13SINGLIBFAC-G = libsingfac-g$(OPTMARK).a 
14
15STRIP = strip
16# define the debugging flags here
17#
18FACDEFINES =
19CHARDEFINES =
20DEFINES = $(FACDEFINES) $(CHARDEFINES)
21WARN = -Wall
22ALLFLAGS = -fno-implicit-templates
23DEBFLAGS= -g $(DEFINES) $(ALLFLAGS)
24DEBFLAGSTMPL= -g $(DEFINES)
25OPTFLAGS = -O3 $(DEFINES) $(ALLFLAGS)
26OPTFLAGSTMPL= -O3 $(DEFINES)
27
28IFLAGS =  -I/usr/local/include -I$(factorypath)  -I./factor
29CXX = gcc
30OPTCXX = gcc
31CXXFLAGS = $(WARN)
32
33# some machines don't like `gcc` as the linker for C++ code...
34# e.g. the SUN Sparc, so we use `g++` as the linker
35LD = g++ $(ALLFLAGS)
36OPTLD = g++ -s $(ALLFLAGS)
37LDFLAGS=
38LIBPATH = -L/usr/local/lib -L$(factorypath) -L.
39
40.SUFFIXES:      .cc .h .o
41
42DEBOBJ/%.o: %.cc ; $(CXX) -c $< $(CXXFLAGS) $(IFLAGS) $(DEBFLAGS) -o $@
43
44OPTOBJ/%.o: %.cc ; $(OPTCXX) -c $< $(CXXFLAGS) $(IFLAGS) $(OPTFLAGS) -o $@
45
46DEBOBJ/%.o: charset/%.cc ; $(CXX) -c $< $(CXXFLAGS) $(IFLAGS) $(DEBFLAGS) -o $@
47
48OPTOBJ/%.o: charset/%.cc ; $(OPTCXX) -c $< $(CXXFLAGS) $(IFLAGS) $(OPTFLAGS) -o $@
49
50DEBOBJ/%.o: factor/%.cc ; $(CXX) -c $< $(CFLAGS) $(IFLAGS) $(DEBFLAGS) -o $@
51
52OPTOBJ/%.o: factor/%.cc ; $(OPTCXX) -c $< $(CFLAGS) $(IFLAGS) $(OPTFLAGS) -o $@
53
54
55FACTORSRC1 =    factor/SqrFree.cc factor/Factor.cc \
56                factor/MVMultiHensel.cc factor/Truefactor.cc \
57                factor/helpstuff.cc  factor/debug.cc factor/version.cc \
58                factor/homogfactor.cc
59FACTORSRC1 =    factor/tmpl_inst.cc
60FACTORSRC =     $(FACTORSRC2) $(FACTORSRC1)
61CHARSETSRC1 =   charset/csutil.cc charset/charset.cc charset/reorder.cc
62CHARSETSRC =    $(CHARSETSRC1)
63FACTORINCL =    factor/Factor.h factor/MVMultiHensel.h factor/Truefactor.h \
64                factor/tmpl_inst.h factor/SqrFree.h factor/helpstuff.h \
65                factor/debug.h factor/timing.h factor/homogfactor.h
66CHARSETINCL =   charset/csutil.h charset/charset.h charset/reorder.h
67
68OPTFACTOROBJ1 = OPTOBJ/SqrFree.o OPTOBJ/Factor.o OPTOBJ/MVMultiHensel.o \
69                OPTOBJ/Truefactor.o OPTOBJ/helpstuff.o OPTOBJ/version.o \
70                OPTOBJ/homogfactor.o
71OPTFACTOROBJ2 = OPTOBJ/tmpl_inst.o
72OPTFACTOROBJ =  $(OPTFACTOROBJ2) $(OPTFACTOROBJ1)
73
74DEBFACTOROBJ1 = DEBOBJ/SqrFree.o DEBOBJ/Factor.o DEBOBJ/MVMultiHensel.o \
75                DEBOBJ/Truefactor.o DEBOBJ/helpstuff.o DEBOBJ/version.o \
76                DEBOBJ/homogfactor.o
77DEBFACTOROBJ2 = DEBOBJ/tmpl_inst.o
78DEBFACTOROBJ =  $(DEBFACTOROBJ2) $(DEBFACTOROBJ1)
79
80CHARSETOPTOBJ = OPTOBJ/csutil.o OPTOBJ/charset.o OPTOBJ/reorder.o
81
82CHARSETDEBOBJ = DEBOBJ/csutil.o DEBOBJ/charset.o DEBOBJ/reorder.o
83
84LIBS = -lfac -lcf -lmem -lgmp -lm #-lPW
85OPTLIBS = -lfac -lcf-optimize -lmem-optimize -lgmp -lm
86DEBLIBS = -lfac-g -lcf-debug -lmem-debug -lgmp -lm
87
88debtest:        libfac-g DEBOBJ/test.o
89                $(LD) -o test $(LIBPATH) DEBOBJ/test.o $(DEBLIBS)
90
91opttest:        libfac OPTOBJ/test.o
92                $(OPTLD) -o test $(LIBPATH) OPTOBJ/test.o $(OPTLIBS)
93
94libfac.a:       $(OPTFACTOROBJ) $(CHARSETOPTOBJ)
95                $(AR) $(LIBFAC) $(OPTFACTOROBJ) $(CHARSETOPTOBJ)
96                $(RANLIB) $(LIBFAC)
97libfac:         libfac.a
98
99libfac-g.a:     $(DEBFACTOROBJ) $(CHARSETDEBOBJ)
100                $(AR) $(LIBFAC-G) $(DEBFACTOROBJ) $(CHARSETDEBOBJ)
101                $(RANLIB) $(LIBFAC-G)
102libfac-g:       libfac-g.a
103
104singlibfac.a:   $(OPTFACTOROBJ1) $(CHARSETOPTOBJ)
105                $(AR) $(SINGLIBFAC) $(OPTFACTOROBJ1) $(CHARSETOPTOBJ)
106                $(RANLIB) $(SINGLIBFAC)
107singlibfac:     singlibfac.a
108
109singlibfac-g.a: $(DEBFACTOROBJ1) $(CHARSETDEBOBJ)
110                $(AR) $(SINGLIBFAC-G) $(DEBFACTOROBJ1) $(CHARSETDEBOBJ)
111                $(RANLIB) $(SINGLIBFAC-G)
112singlibfac-g:   singlibfac-g.a
113
114debtests:       debtest
115                (cd tests ; factortest )
116
117opttests:       opttest
118                (cd tests ; factortest )
119
120tests:          opttests
121
122newdepend: $(FACTORINCL) $(CHARSETINCL)
123        ./bin/makedep -P OPTOBJ $(IFLAGS) $(FACTORSRC1) \
124                                > OPTOBJ/optdepend
125        ./bin/makedep -P DEBOBJ $(DEFINES) $(IFLAGS) $(FACTORSRC1) \
126                                > DEBOBJ/debdepend
127depend: newdepend
128
129clean:
130        $(RM)   test $(LIBFAC) $(LIBFAC-G) $(SINGLIBFAC) $(SINGLIBFAC-g)
131
132cleanall:       clean
133        ( cd charset; make cleanall )
134        $(RM)   OPTOBJ/optdepend DEBOBJ/debdepend  \
135                DEBOBJ/*.o OPTOBJ/*.o \
136
137archive:        cleanall
138                (cd charset ; make cleanall )
139        rm -f ../libfac.tgz
140
141        gtar -zcvf ../libfac.tgz  .
142
143disk:           archive
144        mcopy ../libfac.tgz a:\libfac.tgz
145        mcopy ../libfac.tgz a:\libfac1.tgz
146
147unpack:
148        mcopy a:\libfac.tgz ../libfac.tgz
149        gtar zxvf ../libfac.tgz
150        ( cd charset ; make dirs )
151
152
153DEBOBJ/tmpl_inst.o: factor/tmpl_inst.cc ; $(CXX) -c $< $(CFLAGS) $(DEBFLAGSTMPL) $(IFLAGS) -o $@
154
155OPTOBJ/tmpl_inst.o: factor/tmpl_inst.cc ; $(OPTCXX) -c $< $(CFLAGS) $(OPTFLAGSTMPL) $(IFLAGS) -o $@
156
Note: See TracBrowser for help on using the repository browser.