source: git/Singular/makefile @ b9cf41

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