source: git/kernel/makefile @ d12f186

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