source: git/coeffs/Makefile.in @ b738630

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