source: git/coeffs/Makefile.in @ 0eb229

spielwiese
Last change on this file since 0eb229 was 0eb229, checked in by Hans Schoenemann <hannes@…>, 14 years ago
make test uses the debug library
  • Property mode set to 100644
File size: 2.7 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             = g++
24INSTALL_PROGRAM = @INSTALL@
25INSTALL_DATA    = @INSTALL@ -m 644
26MKINSTALLDIRS   = ../mkinstalldirs
27LN_S            = ln -s
28
29##
30## compiler and linker options
31##
32PIPE            = -pipe
33CFLAGS          = -O3 -w -fomit-frame-pointer ${PIPE}
34CXXFLAGS        = -O3 -w -fomit-frame-pointer --no-rtti ${PIPE} -g
35CXXTEMPLFLAGS   = -fno-implicit-templates --no-exceptions
36CPPFLAGS        = -I${srcdir} -I${includedir} -I${srcdir}/../misc/ -I${srcdir}/../resource/ -I${srcdir}/../reporter/ -L${srcdir}/../reporter/ -L${libdir} -lgmp
37DEFS            = -DNDEBUG -DOM_NDEBUG @DEFS@
38
39#-DHAVE_RINGS
40# -DHAVE_RINGS # Doesn't work :(
41# -DNDEBUG -DOM_NDEBUG
42
43## End configuration dependend stuff
44#################################################################
45
46###
47### file sets
48###
49
50# normal C++ source files
51CXXSOURCES= gnumpc.cc gnumpfl.cc longrat.cc longrat0.cc ffields.cc \
52            modulop.cc mpr_complex.cc \
53            numbers.cc rmodulo2m.cc rmodulon.cc shortfl.cc
54
55# normal C source files
56CSOURCES=
57
58SOURCES=${CSOURCES} ${CXXSOURCES}
59
60HEADERS= gnumpc.h gnumpfl.h longrat.h modulop.h ffields.h \
61         mpr_complex.h mpr_global.h numbers.h \
62         rmodulo2m.h rmodulon.h shortfl.h
63
64DISTFILES=${SOURCES} ${HEADERS}
65
66OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o)
67
68.cc.o: 
69        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $<
70.c.o:
71        ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
72
73libcoeffs.a: ${OBJS}
74        -rm -f libcoeffs.a
75        ar cr $@ $^
76
77## ----------------------------------------------------------------------------
78## debug version:
79FLAGSG         = -g ${PIPE}
80CXXFLAGSG       = -g ${PIPE}
81DEFSG           = @DEFS@
82
83CCG             = ${CC}
84CXXG            = ${CXX}
85OBJSG1 := $(CXXSOURCES:.cc=.og)
86
87libcoeffs_g.a: ${OBJSG1}
88        -rm -f libcoeffs_g.a
89        ar cr $@ $^
90
91%.og: %.cc
92        $(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} -c $< -o $@
93
94##
95## clean targest
96##
97mostlyclean:
98        -rm -f *.o *.og core *.op
99
100cleantest:
101        -rm -Rf test test.dSYM/
102
103clean: mostlyclean cleantest
104        -rm -f *.bak *.d *.dd depend *.a *.so*
105
106tags:   
107        ctags *.c *.h *.cc *.inc
108
109all: libcoeffs.a libcoeffs_g.a
110
111install: all
112        ${MKINSTALLDIRS} ${includedir}
113        ${MKINSTALLDIRS} ${libdir}
114        ${INSTALL_DATA} libcoeffs.a ${libdir}/libcoeffs.a
115        ${INSTALL_DATA} libcoeffs_g.a ${libdir}/libcoeffs_g.a
116        $(INSTALL_DATA) coeffs.h $(includedir)/coeffs.h
117
118test: test.cc libcoeffs_g.a
119        ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} test.cc -L. -I. -lcoeffs_g -o test -lomalloc -lreporter
Note: See TracBrowser for help on using the repository browser.