source: git/coeffs/Makefile.in @ e903733

spielwiese
Last change on this file since e903733 was e903733, checked in by Mohamed Barakat <mohamed.barakat@…>, 14 years ago
coeffs build and the test runs with a segmentation fault in Z_n
  • Property mode set to 100644
File size: 2.8 KB
Line 
1#################################################################
2###
3### Makefile for Singular
4###
5#################################################################
6
7SHELL           = /bin/sh
8
9##
10## various paths
11##
12srcdir          = .
13prefix          = @prefix@
14exec_prefix     = @exec_prefix@
15libdir          = @libdir@
16# includes are taken from here
17includedir      = @includedir@
18
19##
20## various programs
21##
22
23CXX             = @CXX@
24INSTALL         = @INSTALL@
25INSTALL_PROGRAM = @INSTALL_PROGRAM@
26INSTALL_DATA    = @INSTALL_DATA@
27MKINSTALLDIRS   = ../mkinstalldirs
28LN_S            = ln -s
29
30##
31## compiler and linker options
32##
33PIPE            = -pipe
34CFLAGS          = @CFLAGS@ ${PIPE}
35CXXFLAGS        = @CXXFLAGS@ ${PIPE} -g
36CXXTEMPLFLAGS   = -fno-implicit-templates --no-exceptions
37CPPFLAGS        = -I${srcdir} -I${includedir} -I${prefix}/include
38LDFLAGS         = -L${libdir} -L${prefix}/lib
39DEFS            = -DNDEBUG -DOM_NDEBUG @DEFS@
40
41LIBSG           =  @LIBPREFIX@ -lcoeffs_g -lreporter -lresource -lomalloc -lgmp
42
43#-DHAVE_RINGS
44# -DHAVE_RINGS # Doesn't work :(
45# -DNDEBUG -DOM_NDEBUG
46
47## End configuration dependend stuff
48#################################################################
49
50###
51### file sets
52###
53
54# normal C++ source files
55CXXSOURCES= gnumpc.cc gnumpfl.cc longrat.cc longrat0.cc ffields.cc \
56            modulop.cc mpr_complex.cc \
57            numbers.cc rintegers.cc rmodulo2m.cc rmodulon.cc shortfl.cc
58
59# normal C source files
60CSOURCES=
61
62SOURCES=${CSOURCES} ${CXXSOURCES}
63
64HEADERS= gnumpc.h gnumpfl.h longrat.h modulop.h ffields.h \
65         mpr_complex.h mpr_global.h numbers.h \
66         rintegers.h rmodulo2m.h rmodulon.h shortfl.h
67
68DISTFILES=${SOURCES} ${HEADERS}
69
70OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o)
71
72.cc.o: 
73        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
74.c.o:
75        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
76
77libcoeffs.a: ${OBJS}
78        -rm -f $@
79        ar cr $@ $^
80
81## ----------------------------------------------------------------------------
82## debug version:
83FLAGSG         = -g ${PIPE}
84CXXFLAGSG       = -g ${PIPE}
85DEFSG           = @DEFS@
86
87CCG             = ${CC}
88CXXG            = ${CXX} -Wextra -Wall -pedantic -fdiagnostics-show-option -Wno-long-long
89OBJSG1 := $(CXXSOURCES:.cc=.og)
90
91libcoeffs_g.a: ${OBJSG1}
92        -rm -f libcoeffs_g.a
93        ar cr $@ $^
94
95%.og: %.cc
96        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
97
98##
99## clean targest
100##
101mostlyclean:
102        -rm -f *.o *.og core *.op
103
104cleantest:
105        -rm -Rf test test.dSYM/
106
107clean: mostlyclean cleantest
108        -rm -f *.bak *.d *.dd depend *.a *.so*
109
110tags:   
111        ctags *.c *.h *.cc *.inc
112
113all: libcoeffs.a libcoeffs_g.a
114
115install: all
116        ${MKINSTALLDIRS} ${includedir}
117        ${MKINSTALLDIRS} ${libdir}
118        ${INSTALL_DATA} libcoeffs.a ${libdir}/libcoeffs.a
119        ${INSTALL_DATA} libcoeffs_g.a ${libdir}/libcoeffs_g.a
120        $(INSTALL_DATA) coeffs.h $(includedir)/coeffs.h
121
122test: test.cc libcoeffs_g.a
123        ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} test.cc ${LDFLAGS} ${LIBSG} -o test
Note: See TracBrowser for help on using the repository browser.