source: git/Singular/makefile @ 737a68

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