source: git/Singular/makefile @ dd77cc

spielwiese
Last change on this file since dd77cc was 63ee2b, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: better libpolys cflags/libs in Singular/makefile
  • Property mode set to 100644
File size: 7.5 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 = -I.. -I../libpolys
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
40
41PIPE            = -pipe
42CFLAGS          = -O3 -w -fomit-frame-pointer ${PIPE} ${LIBPOLYS_CFLAGS}
43CXXFLAGS        = -O3 -w -fomit-frame-pointer --no-rtti ${PIPE} ${LIBPOLYS_CFLAGS}
44CXXTEMPLFLAGS   = -fno-implicit-templates --no-exceptions
45CPPFLAGS        = -I${srcdir} -I..  -I${includedir}   ${LIBPOLYS_CFLAGS}
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   Minor.cc\
67   MinorInterface.cc\
68   MinorProcessor.cc\
69   attrib.cc\
70   bbcone.cc\
71   bbfan.cc\
72   bigintm.cc\
73   blackbox.cc\
74   calcSVD.cc\
75   cntrlc.cc\
76   denom_list.cc\
77   eigenval_ip.cc\
78   emacs.cc\
79   extra.cc\
80   feOpt.cc\
81   fehelp.cc\
82   fevoices.cc \
83   fglm.cc\
84   gentable.cc\
85   gentable2.cc\
86   gms.cc\
87   grammar.cc\
88   interpolation.cc\
89   iparith.cc\
90   ipassign.cc\
91   ipconv.cc\
92   ipid.cc\
93   iplib.cc\
94   ipprint.cc\
95   ipshell.cc\
96   janet.cc\
97   libparse.cc\
98   linearAlgebra_ip.cc\
99   lists.cc\
100   maps_ip.cc\
101   minpoly.cc\
102   misc_ip.cc\
103   mpsr_Error.cc\
104   mpsr_Get.cc\
105   mpsr_GetMisc.cc\
106   mpsr_GetPoly.cc\
107   mpsr_Put.cc\
108   mpsr_PutPoly.cc\
109   mpsr_Timer.cc\
110   mpsr_Tok.cc\
111   mpsr_sl.cc\
112   ndbm.cc\
113   newstruct.cc\
114   pcv.cc\
115   pipeLink.cc\
116   pyobject.cc\
117   pyobject_setup.cc\
118   scanner.cc\
119   sdb.cc\
120   silink.cc\
121   sing_dbm.cc\
122   sing_win.cc\
123   slInit_Dynamic.cc\
124   slInit_Static.cc\
125   ssiLink.cc\
126   subexpr.cc\
127   tesths.cc\
128   utils.cc\
129   walk.cc\
130   walk_ip.cc\
131   wrapper.cc
132
133CXXSOURCES2     = SingularBuilder.cpp
134
135# special C++ source files (need extra compiling and/or linking), for which
136# dependencies should be generated
137ESOURCES=claptmpl.cc
138
139SOURCES=${CSOURCES} ${CXXSOURCES} \
140        kInline.h
141
142HEADERS=\
143   Cache.h \
144   CacheImplementation.h \
145   Minor.h \
146   MinorInterface.h \
147   MinorProcessor.h \
148   attrib.h \
149   bbcone.h \
150   bigintm.h \
151   blackbox.h \
152   cntrlc.h \
153   dbm_sl.h \
154   distrib.h \
155   eigenval_ip.h \
156   feOpt.h \
157   gms.h \
158   grammar.h \
159   interpolation.h \
160   ipconv.h \
161   ipid.h \
162   ipprint.h \
163   ipshell.h \
164   janet.h \
165   libparse.h \
166   libsingular.h \
167   lists.h \
168   locals.h \
169   maps_ip.h \
170   minpoly.h \
171   misc_ip.h \
172   mpsr.h \
173   mpsr_Get.h \
174   mpsr_Put.h \
175   mpsr_Timer.h \
176   mpsr_Tok.h \
177   mpsr_sl.h \
178   ndbm.h \
179   newstruct.h \
180   omSingularConfig.h \
181   pcv.h \
182   pipeLink.h \
183   pyobject_setup.h \
184   run.h \
185   sdb.h \
186   silink.h \
187   sing_dbm.h \
188   sing_win.h \
189   slInit.h \
190   ssiLink.h \
191   static.h \
192   stype.h \
193   subexpr.h \
194   table.h \
195   tok.h \
196   utils.h \
197   walk.h
198
199
200OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
201OBJS2 := $(ESOURCES:.cc=.o)
202OBJSG2 := $(ESOURCES:.cc=.og)
203OBJSP2 := $(ESOURCES:.cc=.op)
204
205##
206## Build Targets
207##
208.cc.o: 
209        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
210.c.o:
211        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
212
213OBJG= $(CXXSOURCES:.cc=.og) $(CSOURCES:.c=.og)
214
215OBJG := $(OBJG) $(STATIC_SOURCES:.cc=.og) 
216OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) 
217
218all:    Singular
219
220Singular:  ${OBJS}
221
222##
223## clean targest
224##
225mostlyclean: 
226        -rm -f *.o *.og core *.op
227
228clean: mostlyclean
229        -rm -f *.bak *.d *.dd depend *.a *.so*
230
231distclean: clean
232        -rm -f *~ .\#*
233        -rm -f mod2.h Makefile TAGS* tags config.status config.cache config.log
234
235srcclean:
236        @echo "This command is intended for maintainers to use;"
237        @echo "Rebuilding the deleted files requires flex"
238        @echo "bison, perl"
239
240maintainer-clean: distclean srcclean
241        @echo "This command is intended for maintainers to use;"
242        @echo "Rebuilding the deleted files requires flex"
243        @echo "bison, perl and autoconf"
244
245##
246## miscellanous targets
247##
248
249TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS}
250        etags ${SOURCES} ${ESOURCES} ${HEADERS}
251
252tags:   
253        ctags *.c *.h *.cc *.inc
254
255##
256## Below here is stuff for developpers
257#################################################################
258
259
260##
261## .og files for having -O and -g object versions available at the same time
262##
263
264OBJG1 := $(CXXSOURCES:.cc=.og) 
265OBJG2 := $(CSOURCES:.c=.og) 
266
267##
268## compiler and linker options for debug version
269##
270
271CCG             = ${CC}
272CXXG            = ${CXX} -Wall
273CXXM            = gcc -MM -MG -DGENERATE_DEPEND
274CCM             = gcc -MM -MG -DGENERATE_DEPEND
275
276CFLAGSG         = -g ${PIPE} ${LIBPOLYS_CFLAGS}
277CXXFLAGSG       = -g ${PIPE} ${LIBPOLYS_CFLAGS}
278DEFSG           = 
279
280##
281## Debug Targets
282##
283
284%.og: %.cc
285        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
286
287$(OBJG2) : %.og: %.c
288        $(CCG)  ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@
289
290libkernel_g.a: ${OBJG} ${OBJSG2}
291        -rm -f libkernel_g.a
292        ar cr $@ ${OBJG}
293
294
295
296##
297## .op files for profiling
298##
299
300OBJP1 := $(CXXSOURCES:.cc=.op) 
301OBJP2 := $(CSOURCES:.c=.op) 
302
303OBJP=$(OBJP1) $(OBJP2) 
304
305OBJP := $(OBJP) $(STATIC_SOURCES:.cc=.op) 
306
307##
308## compiler and linker options for profiling version
309##
310
311CCP             = ${CC}
312CXXP            = ${CXX}
313
314CFLAGSP         = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
315CXXFLAGSP       = -g -pg -O ${PIPE} ${LIBPOLYS_CFLAGS}
316DEFSP           = 
317
318
319
320
321##
322## Profiling Targets
323##
324
325%.op: %.cc
326        $(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSP} -c $< -o $@
327
328$(OBJP2) : %.op: %.c
329        $(CCP)  ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@
330
331libkernel_p.a: ${OBJP} ${OBJSP2}
332        -rm -f libkernel_p.a
333        ar cr $@ ${OBJP}
334
335##
336## dependencies
337##
338
339%.dd: %.cc mod2.h
340        echo $(@:.dd=.og) $(@:.dd=.op) " " \\ > $@
341        $(CXXM) -DGENTABLE ${CPPFLAGS} ${DEFSG} $< >> $@
342
343%.d: %.c mod2.h
344        echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@
345        $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
346
347depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d) mod2.h
348        cat *.d *.dd >depend
349
350ifeq (depend,$(wildcard depend))
351include depend
352endif
353
354
355# My headers test
356# test: test.o
357
358test.o: test.cc mod2.h feOpt.inc
359        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
360
361feOpt.inc: feOpt.cc mod2.h
362        $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} feOpt.cc -o feOpt
363        ./feOpt
364        /bin/rm -f feOpt feOpt.exe
365
366feOptES.inc: feOpt.cc mod2.h
367        $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} -DESINGULAR -I../kernel feOpt.cc -o feOptES
368        ./feOptES
369        rm -f feOptES feOptES.exe
370
371feOptTS.inc: feOpt.cc mod2.h
372        $(CXX) $(CXXFLAGS) -DGENERATE_OPTION_INDEX ${CPPFLAGS} -DTSINGULAR -I../kernel feOpt.cc -o feOptTS
373        ./feOptTS
374        rm -f feOptTS feOptTS.exe
375
376iparith.inc: gentable.cc grammar.h tok.h table.h mod2.h
377         ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} gentable.cc \
378             -o gentable1
379        ./gentable1
380        /bin/rm -f gentable1 gentable1.exe
Note: See TracBrowser for help on using the repository browser.