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 = @CXX@ |
---|
24 | INSTALL = @INSTALL@ |
---|
25 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
---|
26 | INSTALL_DATA = @INSTALL_DATA@ |
---|
27 | MKINSTALLDIRS = ../mkinstalldirs |
---|
28 | LN_S = ln -s |
---|
29 | RANLIB = @RANLIB@ |
---|
30 | |
---|
31 | ## |
---|
32 | ## compiler and linker options |
---|
33 | ## |
---|
34 | PIPE = -pipe |
---|
35 | CFLAGS = -fpic @CFLAGS@ ${PIPE} |
---|
36 | CXXFLAGS = -fpic @CXXFLAGS@ ${PIPE} |
---|
37 | #CXXTEMPLFLAGS = -fno-implicit-templates --no-exceptions |
---|
38 | CPPFLAGS = -I${includedir} |
---|
39 | DEFS = -DGMPRATIONAL |
---|
40 | |
---|
41 | ## End configuration dependend stuff |
---|
42 | ################################################################# |
---|
43 | |
---|
44 | ### |
---|
45 | ### file sets |
---|
46 | ### |
---|
47 | |
---|
48 | # normal C++ source files |
---|
49 | CXXSOURCES= gfanlib_zcone.cpp gfanlib_symmetry.cpp gfanlib_symmetriccomplex.cpp gfanlib_polyhedralfan.cpp gfanlib_zfan.cpp gfanlib_polymakefile.cpp |
---|
50 | |
---|
51 | # normal C source files |
---|
52 | CSOURCES= |
---|
53 | |
---|
54 | SOURCES=${CSOURCES} ${CXXSOURCES} |
---|
55 | |
---|
56 | HEADERS=gfanlib_z.h gfanlib_q.h gfanlib_vector.h gfanlib_matrix.h gfanlib_zcone.h gfanlib.h gfanlib_polyhedralfan.h gfanlib_polymakefile.h gfanlib_symmetriccomplex.h gfanlib_zfan.h |
---|
57 | |
---|
58 | DISTFILES=${SOURCES} ${HEADERS} |
---|
59 | |
---|
60 | OBJS := $(CXXSOURCES:.cpp=.o) $(CSOURCES:.c=.o) |
---|
61 | |
---|
62 | .cpp.o: |
---|
63 | ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
64 | .c.o: |
---|
65 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
66 | |
---|
67 | libgfan.a: ${OBJS} |
---|
68 | -rm -f $@ |
---|
69 | ar cr $@ $^ |
---|
70 | |
---|
71 | all: libgfan.a |
---|
72 | |
---|
73 | install: all |
---|
74 | ${MKINSTALLDIRS} ${includedir} |
---|
75 | ${MKINSTALLDIRS} ${libdir} |
---|
76 | cp gfanlib*.h ${includedir}/ |
---|
77 | cp libgfan.a ${libdir}/libgfan.a |
---|
78 | $(RANLIB) ${libdir}/libgfan.a |
---|
79 | |
---|
80 | ## |
---|
81 | ## clean targest |
---|
82 | ## |
---|
83 | mostlyclean: |
---|
84 | -rm -f *.o *.og core *.op |
---|
85 | |
---|
86 | clean: mostlyclean |
---|
87 | -rm -f *.bak *.d *.dd depend *.a *.so* |
---|
88 | |
---|
89 | tags: |
---|
90 | ctags *.c *.h *.cc *.inc |
---|