source: git/kernel/makefile @ e63576

spielwiese
Last change on this file since e63576 was e63576, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
FIX: started moving GB-related non-commutative routines to kernel/
  • Property mode set to 100644
File size: 7.4 KB
RevLine 
[6c19d8]1# Generated automatically from Makefile.in by configure.-
2#################################################################
3###
4### Makefile for Singular
5###
6#################################################################
7
8SHELL           = /bin/sh
9
10##
11## version
12##
13SINGULAR_VERSION        = spielwiese
14##
15## various paths
16##
17srcdir          = .
18includedir      = ../libpolys
19
20##
21## various programs
22##
23
24CC              = gcc
25LD              = ld
26CXX             = g++
27PERL            = perl
28INSTALL         = /usr/bin/install -c
29INSTALL_PROGRAM = ${INSTALL}
30INSTALL_DATA    = ${INSTALL} -m 644
31MKINSTALLDIRS   = ./mkinstalldirs
32LN_S            = ln -s
33
34##
35## compiler and linker options
36##
[3705cd9]37LIBPOLYS_CFLAGS = -I.. -I../libpolys -DHAVE_SINGULAR
[6b71e2]38LIBPOLYS_LIBS   = -L../factory -L../omalloc -L../libpolys/misc -L../libpolys/reporter -L../libpolys/resources -L../libpolys/coeffs -L../libpolys/polys -lpolys -lcoeffs -lresources -lreporter -lmisc -lfactory -lomalloc
39LIBPOLYS_LIBSG   = -L../factory -L../omalloc -L../libpolys/misc -L../libpolys/reporter -L../libpolys/resources -L../libpolys/coeffs -L../libpolys/polys -lpolys_g -lcoeffs_g -lresources_g -lreporter_g -lmisc_g -lfactory -lomalloc_g
[cab375]40
[6c19d8]41PIPE            = -pipe
[e63576]42CFLAGS          = -O3 -fomit-frame-pointer ${PIPE} ${LIBPOLYS_CFLAGS}
43CXXFLAGS        = -O3 -fomit-frame-pointer --no-rtti ${PIPE} ${LIBPOLYS_CFLAGS}
[6c19d8]44CXXTEMPLFLAGS   = -fno-implicit-templates --no-exceptions
[cab375]45CPPFLAGS        = -I${srcdir} -I..  -I${includedir}   ${LIBPOLYS_CFLAGS}
[6c19d8]46DEFS            = -DNDEBUG -DOM_NDEBUG
47LDFLAGS         = -L${srcdir}/lib
48LD_DYN_FLAGS    = -ldl -rdynamic
49SFLAGS          = -fpic -DPIC
50SLDFLAGS        = -shared
51
52LD_LIBC         = -lc
53STATIC_LDFLAGS  = -static
54LIBS            = -lm -lsingfac -lsingcf -lntl -lgmp -lreadline -lncurses -lm  -lnsl  -lomalloc_ndebug
55MP_LIBS         = -lMPT -lMP -lnsl
56
57## End configuration dependend stuff
58#################################################################
59
60###
61### file sets
62###
63
64# normal C++ source files
65CXXSOURCES=\
66    febase.cc feread.cc \
67    hdegree.cc hilb.cc hutil.cc \
68    gr_kstd2.cc \
[1745e5]69    ideals.cc \
[6c19d8]70    khstd.cc kstdfac.cc \
71    kstd1.cc kstd2.cc kutil.cc \
[76cfef]72    misc.cc \
73    fast_maps.cc \
[6c19d8]74    fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \
75    kspoly.cc \
[f78059]76    semic.cc \
[6c19d8]77    syz.cc syz0.cc syz1.cc syz2.cc syz3.cc\
78    timer.cc \
79    GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc \
80    walkProc.cc walkMain.cc walkSupport.cc\
81    eigenval.cc units.cc \
82    fast_mult.cc digitech.cc \
83    tgb.cc tgbgauss.cc ringgb.cc f5data.cc f5lists.cc f5gb.cc \
[2b85f31]84    f5c.cc ratgring.cc shiftgb.cc gfan.cc \
[e63576]85    linearAlgebra.cc nc.cc
[6c19d8]86CXXSOURCES2     = SingularBuilder.cpp
87
[76cfef]88#    numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc \
89
[6c19d8]90# normal C source files
91CSOURCES=fegetopt.c mmstd.c
92
93# special C++ source files (need extra compiling and/or linking), for which
94# dependencies should be generated
95ESOURCES=mmalloc.cc
96
97SOURCES=${CSOURCES} ${CXXSOURCES} \
[c6e80e]98        kInline.h
[6c19d8]99
100HEADERS=hutil.h idrec.h stairc.h ideals.h \
[1745e5]101        structs.h \
[6c19d8]102        syz.h \
103        fast_maps.h \
104        febase.h \
105        walkProc.h walkMain.h walkSupport.h\
106        khstd.h sparsmat.h \
107        fglm.h kstd1.h \
108        fglmgauss.h fglmvec.h \
109        kstdfac.h kmatrix.h\
110        kutil.h \
111        GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h \
112        eigenval.h units.h \
113        fegetopt.h \
[e63576]114        ratgring.h shiftgb.h nc.h \
[6c19d8]115        mmalloc.h \
[f78059]116        semic.h \
[6c19d8]117        gfan.h
118
119DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \
120        Makefile.in \
121        mod2.h.in install-sh mkinstalldirs
122
123OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
124OBJS2 := $(ESOURCES:.cc=.o)
125OBJSG2 := $(ESOURCES:.cc=.og)
126OBJSP2 := $(ESOURCES:.cc=.op)
127
128##
129## Build Targets
130##
131.cc.o: 
132        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
133.c.o:
134        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
135
136OBJG= $(CXXSOURCES:.cc=.og) $(CSOURCES:.c=.og)
137
138OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) 
139OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) 
140
141all:    libkernel.a libkernel_g.a mmalloc.o ${OBJS2}
142
143libkernel.a: ${OBJS}
144        -rm -f libkernel.a
145        ar cr $@ $^
146
147##
148## install targets
149##
150install-nolns: install
151
152install-libsingular: install
153        -${MKINSTALLDIRS} ${includedir}
154        -${MKINSTALLDIRS} ${includedir}/singular
[c6e80e]155        -for file in *.h kInline.h; do sed -e "s:<kernel/:<singular/:"< $$file | sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" > ${includedir}/singular/$$file; done
[6c19d8]156
157install: all installbin
158
159install_all: install libkernel_p.a
160        - ranlib libkernel_p.a
161
162installbin: libkernel.a libkernel_g.a
163        ${MKINSTALLDIRS} ${bindir}
164        - ranlib libkernel.a
165        - ranlib libkernel_g.a
166
167install-bindist: libkernel.a
168        ${MKINSTALLDIRS} ${bindir}
169
170##
171## clean targest
172##
173mostlyclean: 
174        -rm -f *.o *.og core *.op
175
176clean: mostlyclean
177        -rm -f *.bak *.d *.dd depend *.a *.so*
178
179distclean: clean
180        -rm -f *~ .\#*
181        -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log
182
183srcclean:
184        @echo "This command is intended for maintainers to use;"
185        @echo "Rebuilding the deleted files requires flex"
186        @echo "bison, perl"
187
188maintainer-clean: distclean srcclean
189        @echo "This command is intended for maintainers to use;"
190        @echo "Rebuilding the deleted files requires flex"
191        @echo "bison, perl and autoconf"
192
193##
194## miscellanous targets
195##
196
197TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS}
198        etags ${SOURCES} ${ESOURCES} ${HEADERS}
199
200tags:   
201        ctags *.c *.h *.cc *.inc
202
203##
204## Below here is stuff for developpers
205#################################################################
206
207
208##
209## .og files for having -O and -g object versions available at the same time
210##
211
212OBJG1 := $(CXXSOURCES:.cc=.og) 
213OBJG2 := $(CSOURCES:.c=.og) 
214
215##
216## compiler and linker options for debug version
217##
218
219CCG             = ${CC}
220CXXG            = ${CXX} -Wall
221CXXM            = gcc -MM -MG -DGENERATE_DEPEND
222CCM             = gcc -MM -MG -DGENERATE_DEPEND
223
[cab375]224CFLAGSG         = -g ${PIPE} ${LIBPOLYS_CFLAGS}
225CXXFLAGSG       = -g ${PIPE} ${LIBPOLYS_CFLAGS}
[6c19d8]226DEFSG           = 
227
228##
229## Debug Targets
230##
231
232%.og: %.cc
233        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
234
235$(OBJG2) : %.og: %.c
236        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
237
238libkernel_g.a: ${OBJG} ${OBJSG2}
239        -rm -f libkernel_g.a
240        ar cr $@ ${OBJG}
241
[210e07]242
243
[6c19d8]244##
245## .op files for profiling
246##
247
248OBJP1 := $(CXXSOURCES:.cc=.op) 
249OBJP2 := $(CSOURCES:.c=.op) 
250
251OBJP=$(OBJP1) $(OBJP2) 
252
253OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) 
254
255##
256## compiler and linker options for profiling version
257##
258
259CCP             = ${CC}
260CXXP            = ${CXX}
261
[cab375]262CFLAGSP         = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
263CXXFLAGSP       = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
[6c19d8]264DEFSP           = 
265
[210e07]266
267
268
[6c19d8]269##
270## Profiling Targets
271##
272
273%.op: %.cc
274        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSP} -c $< -o $@
275
276$(OBJP2) : %.op: %.c
277        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
278
279libkernel_p.a: ${OBJP} ${OBJSP2}
280        -rm -f libkernel_p.a
281        ar cr $@ ${OBJP}
282
283##
284## dependencies
285##
286
287%.dd: %.cc mod2.h
288        echo $(@:.dd=.og) $(@:.dd=.op) " " \\ > $@
289        $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
290
291%.d: %.c mod2.h
292        echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@
293        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
294
295depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
296        cat *.d *.dd >depend
297
298ifeq (depend,$(wildcard depend))
299include depend
300endif
301
302
[6b71e2]303test.og: test.cc mod2.h libkernel_g.a 
[b54a36e]304        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@ 
[210e07]305
[6b71e2]306test.o: test.cc mod2.h libkernel_g.a 
307        $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< -o $@ 
308
309
310test-g: test.og
311        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} $< -o $@ -L. -lkernel_g ${LIBPOLYS_LIBSG} -lntl -ldl -lgmp
312
313test: test.o
314        $(CXX) ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@ -L. -lkernel ${LIBPOLYS_LIBS} -lntl -ldl -lgmp
[b54a36e]315
316# My headers test
[c3e4d2]317check: all test test-g
Note: See TracBrowser for help on using the repository browser.