source: git/kernel/makefile @ c6e80e

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