1 | ################################################################# |
---|
2 | ### |
---|
3 | ### Makefile for Singular |
---|
4 | ### |
---|
5 | ################################################################# |
---|
6 | |
---|
7 | SHELL = /bin/sh |
---|
8 | |
---|
9 | ## |
---|
10 | ## various paths |
---|
11 | ## |
---|
12 | srcdir = . |
---|
13 | prefix = @prefix@ |
---|
14 | exec_prefix = @exec_prefix@ |
---|
15 | libdir = @libdir@ |
---|
16 | # includes are taken from here |
---|
17 | includedir = @includedir@ |
---|
18 | |
---|
19 | ## |
---|
20 | ## various programs |
---|
21 | ## |
---|
22 | |
---|
23 | CXX = g++ |
---|
24 | INSTALL_PROGRAM = @INSTALL@ |
---|
25 | INSTALL_DATA = @INSTALL@ -m 644 |
---|
26 | MKINSTALLDIRS = ../mkinstalldirs |
---|
27 | LN_S = ln -s |
---|
28 | |
---|
29 | ## |
---|
30 | ## compiler and linker options |
---|
31 | ## |
---|
32 | PIPE = -pipe |
---|
33 | CFLAGS = -O3 -w -fomit-frame-pointer ${PIPE} |
---|
34 | CXXFLAGS = -O3 -w -fomit-frame-pointer --no-rtti ${PIPE} -g |
---|
35 | CXXTEMPLFLAGS = -fno-implicit-templates --no-exceptions |
---|
36 | CPPFLAGS = -I${srcdir} -I${includedir} -I${srcdir}/../misc/ -I${srcdir}/../resource/ -I${srcdir}/../reporter/ -L${srcdir}/../reporter/ -L${libdir} -lgmp |
---|
37 | DEFS = -Dix86_Linux -DHAVE_CONFIG_H -DLDEBUG -DDEBUG -DOM_DEBUG -DHAVE_ASSUME |
---|
38 | |
---|
39 | # -DNDEBUG -DOM_NDEBUG |
---|
40 | |
---|
41 | ## End configuration dependend stuff |
---|
42 | ################################################################# |
---|
43 | |
---|
44 | ### |
---|
45 | ### file sets |
---|
46 | ### |
---|
47 | |
---|
48 | # normal C++ source files |
---|
49 | CXXSOURCES= gnumpc.cc gnumpfl.cc longrat.cc longrat0.cc ffields.cc \ |
---|
50 | modulop.cc mpr_complex.cc \ |
---|
51 | numbers.cc rmodulo2m.cc rmodulon.cc shortfl.cc |
---|
52 | |
---|
53 | # normal C source files |
---|
54 | CSOURCES= |
---|
55 | |
---|
56 | SOURCES=${CSOURCES} ${CXXSOURCES} |
---|
57 | |
---|
58 | HEADERS= gnumpc.h gnumpfl.h longrat.h modulop.h ffields.h \ |
---|
59 | mpr_complex.h mpr_global.h numbers.h \ |
---|
60 | rmodulo2m.h rmodulon.h shortfl.h |
---|
61 | |
---|
62 | DISTFILES=${SOURCES} ${HEADERS} |
---|
63 | |
---|
64 | OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) |
---|
65 | |
---|
66 | .cc.o: |
---|
67 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
68 | .c.o: |
---|
69 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
70 | |
---|
71 | libcoeffs.a: ${OBJS} |
---|
72 | -rm -f libcoeffs.a |
---|
73 | ar cr $@ $^ |
---|
74 | |
---|
75 | ## |
---|
76 | ## clean targest |
---|
77 | ## |
---|
78 | mostlyclean: |
---|
79 | -rm -f *.o *.og core *.op |
---|
80 | |
---|
81 | clean: mostlyclean |
---|
82 | -rm -f *.bak *.d *.dd depend *.a *.so* test |
---|
83 | |
---|
84 | |
---|
85 | tags: |
---|
86 | ctags *.c *.h *.cc *.inc |
---|
87 | |
---|
88 | all: libcoeffs.a |
---|
89 | |
---|
90 | install: all |
---|
91 | ${MKINSTALLDIRS} ${includedir} |
---|
92 | ${MKINSTALLDIRS} ${libdir} |
---|
93 | ${INSTALL_DATA} libcoeffs.a ${libdir}/libcoeffs.a |
---|
94 | $(INSTALL_DATA) coeffs.h $(includedir)/coeffs.h |
---|
95 | |
---|
96 | test: test.cc libcoeffs.a |
---|
97 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} test.cc -L. -I. -lcoeffs -o test -lomalloc -lreporter |
---|