source: git/kernel/makefile @ 1745e5

spielwiese
Last change on this file since 1745e5 was 1745e5, checked in by Hans Schoenemann <hannes@…>, 13 years ago
int64.* ->misc, rCopy0AndAddA ->ring.h, fix walkSupport.cc
  • 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 \
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    semic.cc \
75    syz.cc syz0.cc syz1.cc syz2.cc syz3.cc\
76    timer.cc \
77    GMPrat.cc multicnt.cc npolygon.cc semic.cc spectrum.cc splist.cc \
78    walkProc.cc walkMain.cc walkSupport.cc\
79    eigenval.cc units.cc \
80    fast_mult.cc digitech.cc \
81    tgb.cc tgbgauss.cc ringgb.cc f5data.cc f5lists.cc f5gb.cc \
82    f5c.cc ratgring.cc shiftgb.cc gfan.cc \
83    linearAlgebra.cc
84CXXSOURCES2     = SingularBuilder.cpp
85
86#    numbers.cc polys.cc p_polys.cc polys0.cc polys1.cc polys-impl.cc \
87
88# normal C source files
89CSOURCES=fegetopt.c mmstd.c
90
91# special C++ source files (need extra compiling and/or linking), for which
92# dependencies should be generated
93ESOURCES=mmalloc.cc
94
95SOURCES=${CSOURCES} ${CXXSOURCES} \
96        kInline.h
97
98HEADERS=hutil.h idrec.h stairc.h ideals.h \
99        structs.h \
100        syz.h \
101        fast_maps.h \
102        febase.h \
103        walkProc.h walkMain.h walkSupport.h\
104        khstd.h sparsmat.h \
105        fglm.h kstd1.h \
106        fglmgauss.h fglmvec.h \
107        kstdfac.h kmatrix.h\
108        kutil.h \
109        dbm_sl.h \
110        GMPrat.h multicnt.h npolygon.h semic.h spectrum.h splist.h multicnt.h \
111        eigenval.h units.h \
112        fegetopt.h \
113        ratgring.h shiftgb.h \
114        mmalloc.h \
115        semic.h \
116        gfan.h
117
118DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \
119        Makefile.in \
120        mod2.h.in install-sh mkinstalldirs
121
122OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
123OBJS2 := $(ESOURCES:.cc=.o)
124OBJSG2 := $(ESOURCES:.cc=.og)
125OBJSP2 := $(ESOURCES:.cc=.op)
126
127##
128## Build Targets
129##
130.cc.o: 
131        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
132.c.o:
133        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
134
135OBJG= $(CXXSOURCES:.cc=.og) $(CSOURCES:.c=.og)
136
137OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) 
138OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) 
139
140all:    libkernel.a libkernel_g.a mmalloc.o ${OBJS2}
141
142libkernel.a: ${OBJS}
143        -rm -f libkernel.a
144        ar cr $@ $^
145
146##
147## install targets
148##
149install-nolns: install
150
151install-libsingular: install
152        -${MKINSTALLDIRS} ${includedir}
153        -${MKINSTALLDIRS} ${includedir}/singular
154        -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
155
156install: all installbin
157
158install_all: install libkernel_p.a
159        - ranlib libkernel_p.a
160
161installbin: libkernel.a libkernel_g.a
162        ${MKINSTALLDIRS} ${bindir}
163        - ranlib libkernel.a
164        - ranlib libkernel_g.a
165
166install-bindist: libkernel.a
167        ${MKINSTALLDIRS} ${bindir}
168
169##
170## clean targest
171##
172mostlyclean: 
173        -rm -f *.o *.og core *.op
174
175clean: mostlyclean
176        -rm -f *.bak *.d *.dd depend *.a *.so*
177
178distclean: clean
179        -rm -f *~ .\#*
180        -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log
181
182srcclean:
183        @echo "This command is intended for maintainers to use;"
184        @echo "Rebuilding the deleted files requires flex"
185        @echo "bison, perl"
186
187maintainer-clean: distclean srcclean
188        @echo "This command is intended for maintainers to use;"
189        @echo "Rebuilding the deleted files requires flex"
190        @echo "bison, perl and autoconf"
191
192##
193## miscellanous targets
194##
195
196TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS}
197        etags ${SOURCES} ${ESOURCES} ${HEADERS}
198
199tags:   
200        ctags *.c *.h *.cc *.inc
201
202##
203## Below here is stuff for developpers
204#################################################################
205
206
207##
208## .og files for having -O and -g object versions available at the same time
209##
210
211OBJG1 := $(CXXSOURCES:.cc=.og) 
212OBJG2 := $(CSOURCES:.c=.og) 
213
214##
215## compiler and linker options for debug version
216##
217
218CCG             = ${CC}
219CXXG            = ${CXX} -Wall
220CXXM            = gcc -MM -MG -DGENERATE_DEPEND
221CCM             = gcc -MM -MG -DGENERATE_DEPEND
222
223CFLAGSG         = -g ${PIPE} ${LIBPOLYS_CFLAGS}
224CXXFLAGSG       = -g ${PIPE} ${LIBPOLYS_CFLAGS}
225DEFSG           = 
226
227##
228## Debug Targets
229##
230
231%.og: %.cc
232        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
233
234$(OBJG2) : %.og: %.c
235        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
236
237libkernel_g.a: ${OBJG} ${OBJSG2}
238        -rm -f libkernel_g.a
239        ar cr $@ ${OBJG}
240
241
242
243##
244## .op files for profiling
245##
246
247OBJP1 := $(CXXSOURCES:.cc=.op) 
248OBJP2 := $(CSOURCES:.c=.op) 
249
250OBJP=$(OBJP1) $(OBJP2) 
251
252OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) 
253
254##
255## compiler and linker options for profiling version
256##
257
258CCP             = ${CC}
259CXXP            = ${CXX}
260
261CFLAGSP         = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
262CXXFLAGSP       = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
263DEFSP           = 
264
265
266
267
268##
269## Profiling Targets
270##
271
272%.op: %.cc
273        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSP} -c $< -o $@
274
275$(OBJP2) : %.op: %.c
276        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
277
278libkernel_p.a: ${OBJP} ${OBJSP2}
279        -rm -f libkernel_p.a
280        ar cr $@ ${OBJP}
281
282##
283## dependencies
284##
285
286%.dd: %.cc mod2.h
287        echo $(@:.dd=.og) $(@:.dd=.op) " " \\ > $@
288        $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
289
290%.d: %.c mod2.h
291        echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@
292        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
293
294depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
295        cat *.d *.dd >depend
296
297ifeq (depend,$(wildcard depend))
298include depend
299endif
300
301
302# My headers test
303# test: test.o
304
305test.o: test.cc mod2.h
306        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
Note: See TracBrowser for help on using the repository browser.