[103906] | 1 | ################################################################# |
---|
[7d90aa] | 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++ |
---|
[b695dd] | 24 | INSTALL_PROGRAM = @INSTALL@ |
---|
| 25 | INSTALL_DATA = @INSTALL@ -m 644 |
---|
| 26 | MKINSTALLDIRS = ../mkinstalldirs |
---|
[7d90aa] | 27 | LN_S = ln -s |
---|
| 28 | |
---|
| 29 | ## |
---|
| 30 | ## compiler and linker options |
---|
| 31 | ## |
---|
| 32 | PIPE = -pipe |
---|
| 33 | CFLAGS = -O3 -w -fomit-frame-pointer ${PIPE} |
---|
[c3d175] | 34 | CXXFLAGS = -O3 -w -fomit-frame-pointer --no-rtti ${PIPE} -g |
---|
[7d90aa] | 35 | CXXTEMPLFLAGS = -fno-implicit-templates --no-exceptions |
---|
[c08834] | 36 | CPPFLAGS = -I${srcdir} -I${includedir} -I${srcdir}/../misc/ -I${srcdir}/../resource/ -I${srcdir}/../reporter/ -L${srcdir}/../reporter/ -L${libdir} -lgmp |
---|
[c47d678] | 37 | DEFS = -Dix86_Linux -DHAVE_CONFIG_H -DLDEBUG -DDEBUG -DOM_DEBUG -DHAVE_ASSUME -DHAVE_RINGS |
---|
| 38 | # -DHAVE_RINGS # Doesn't work :( |
---|
[2b957a] | 39 | # -DNDEBUG -DOM_NDEBUG |
---|
[7d90aa] | 40 | |
---|
| 41 | ## End configuration dependend stuff |
---|
| 42 | ################################################################# |
---|
| 43 | |
---|
| 44 | ### |
---|
| 45 | ### file sets |
---|
| 46 | ### |
---|
| 47 | |
---|
| 48 | # normal C++ source files |
---|
[3b1a8d2] | 49 | CXXSOURCES= gnumpc.cc gnumpfl.cc longrat.cc longrat0.cc ffields.cc \ |
---|
[332bfb] | 50 | modulop.cc mpr_complex.cc \ |
---|
[7d90aa] | 51 | numbers.cc rmodulo2m.cc rmodulon.cc shortfl.cc |
---|
| 52 | |
---|
| 53 | # normal C source files |
---|
| 54 | CSOURCES= |
---|
| 55 | |
---|
| 56 | SOURCES=${CSOURCES} ${CXXSOURCES} |
---|
| 57 | |
---|
[3b1a8d2] | 58 | HEADERS= gnumpc.h gnumpfl.h longrat.h modulop.h ffields.h \ |
---|
[332bfb] | 59 | mpr_complex.h mpr_global.h numbers.h \ |
---|
[7d90aa] | 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 |
---|
[c3d175] | 82 | -rm -f *.bak *.d *.dd depend *.a *.so* test |
---|
| 83 | |
---|
[7d90aa] | 84 | |
---|
| 85 | tags: |
---|
| 86 | ctags *.c *.h *.cc *.inc |
---|
[54336c] | 87 | |
---|
| 88 | all: libcoeffs.a |
---|
| 89 | |
---|
| 90 | install: all |
---|
| 91 | ${MKINSTALLDIRS} ${includedir} |
---|
| 92 | ${MKINSTALLDIRS} ${libdir} |
---|
| 93 | ${INSTALL_DATA} libcoeffs.a ${libdir}/libcoeffs.a |
---|
[b695dd] | 94 | $(INSTALL_DATA) coeffs.h $(includedir)/coeffs.h |
---|
[c3d175] | 95 | |
---|
[2b957a] | 96 | test: test.cc libcoeffs.a |
---|
[c08834] | 97 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} test.cc -L. -I. -lcoeffs -o test -lomalloc -lreporter |
---|