source: git/kernel/makefile @ 9d53d0

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