source: git/Singular/makefile @ 746fd8

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