1 | ################################################################# |
---|
2 | ### |
---|
3 | ### Makefile for Singular-modules |
---|
4 | ### |
---|
5 | ### $Id: Makefile.in,v 1.10 2005-04-30 09:06:46 krueger Exp $ |
---|
6 | ### |
---|
7 | ################################################################# |
---|
8 | |
---|
9 | SHELL = /bin/sh |
---|
10 | |
---|
11 | ## |
---|
12 | ## various paths |
---|
13 | ## |
---|
14 | topsrcdir = @top_srcdir@ |
---|
15 | srcdir = @srcdir@ |
---|
16 | prefix = @prefix@ |
---|
17 | exec_prefix = @exec_prefix@ |
---|
18 | libdir = @libdir@ |
---|
19 | # program executable goes here |
---|
20 | bindir = @bindir@ |
---|
21 | # Singular libs go here |
---|
22 | includedir = @includedir@ |
---|
23 | INC_SRC = ${topsrcdir}/Singular |
---|
24 | |
---|
25 | ## |
---|
26 | ## various programs |
---|
27 | ## |
---|
28 | CC = @CC@ |
---|
29 | CXX = @CXX@ |
---|
30 | #LEXP = @LEXP@ |
---|
31 | PERL = @PERL@ |
---|
32 | BISON = bison |
---|
33 | @SET_MAKE@ |
---|
34 | INSTALL = ./install-sh -c |
---|
35 | INSTALL_PROGRAM = ${INSTALL} |
---|
36 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
37 | MKINSTALLDIRS = ./mkinstalldirs |
---|
38 | MODGEN = ${srcdir}/modgen/modgen |
---|
39 | |
---|
40 | ## |
---|
41 | ## compiler and linker options |
---|
42 | ## |
---|
43 | CFLAGS = @CFLAGS@ -pipe -I${srcdir} -I${INC_SRC} |
---|
44 | CXXFLAGS = @CXXFLAGS@ -pipe |
---|
45 | #CXXTEMPLFLAGS = @CXXTEMPLFLAGS@ |
---|
46 | CPPFLAGS = -I${srcdir} @CPPFLAGS@ -I${includedir} -I${INC_SRC} |
---|
47 | DEFS = @DEFS@ -DNDEBUG |
---|
48 | LDFLAGS = @LDFLAGS@ # @LD_DYNAMIC@ |
---|
49 | #STATIC_LDFLAGS = @STATIC_LDFLAGS@ |
---|
50 | #LIBS = @NEED_LIBS@ |
---|
51 | |
---|
52 | ## |
---|
53 | ## End configuration dependend stuff |
---|
54 | ################################################################# |
---|
55 | ## |
---|
56 | ## compiler and linker options |
---|
57 | ## |
---|
58 | CFLAGS += ${DEFS} |
---|
59 | |
---|
60 | MOD_FILES = loctriv pcv |
---|
61 | MOD_DIRS = kernel |
---|
62 | |
---|
63 | ## |
---|
64 | ## |
---|
65 | ## |
---|
66 | |
---|
67 | all: modgen mod_prepare modules |
---|
68 | |
---|
69 | mod_prepare: modgen |
---|
70 | for file in ${MOD_FILES}; do \ |
---|
71 | if test -d $${file}; then \ |
---|
72 | echo Directory $${file} exists! Ignoring $${file}; \ |
---|
73 | echo Use make mod_clean or remove directory by hand; \ |
---|
74 | fi; \ |
---|
75 | ${MODGEN} -i ${bindir} $${file}.mod ;\ |
---|
76 | done |
---|
77 | |
---|
78 | modgen: |
---|
79 | cd modgen; make install |
---|
80 | |
---|
81 | modules: mod_prepare |
---|
82 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
83 | do \ |
---|
84 | if test -d $${SUBDIR}; then \ |
---|
85 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
86 | ( cd $${SUBDIR} && ${MAKE} ;) \ |
---|
87 | fi;\ |
---|
88 | if test !-d $${SUBDIR}; then \ |
---|
89 | echo directory $${SUBDIR} does not exist!; \ |
---|
90 | fi;\ |
---|
91 | done |
---|
92 | |
---|
93 | clean: |
---|
94 | rm -f *.o *.lo *.so* *.la *~ core |
---|
95 | ( cd modgen && make $@; ) |
---|
96 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
97 | do \ |
---|
98 | if test -d $${SUBDIR}; then \ |
---|
99 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
100 | if [ -e "$${SUBDIR}/Makefile" ]; then (cd $${SUBDIR}; $(MAKE) $@;) fi \ |
---|
101 | fi; \ |
---|
102 | done |
---|
103 | |
---|
104 | mod_clean: |
---|
105 | for SUBDIR in ${MOD_FILES}; \ |
---|
106 | do \ |
---|
107 | if test -d $${SUBDIR}; then \ |
---|
108 | echo removing $${SUBDIR};\ |
---|
109 | rm -rf $${SUBDIR}; \ |
---|
110 | fi; \ |
---|
111 | done |
---|
112 | |
---|
113 | for SUBDIR in ${MOD_DIRS}; \ |
---|
114 | do \ |
---|
115 | if test -d $${SUBDIR}; then \ |
---|
116 | echo ${MAKE} clean in $${SUBDIR}; \ |
---|
117 | if [ -e "$${SUBDIR}/Makefile" ]; then (cd $${SUBDIR}; $(MAKE) clean;) fi \ |
---|
118 | fi; \ |
---|
119 | done |
---|
120 | |
---|
121 | distclean: clean mod_clean |
---|
122 | ( cd modgen && make clean ) |
---|
123 | for SUBDIR in ${MOD_DIRS}; \ |
---|
124 | do \ |
---|
125 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
126 | if [ -e "$${SUBDIR}/Makefile" ]; then (cd $${SUBDIR}; $(MAKE) clean;) fi \ |
---|
127 | done |
---|
128 | rm -f Makefile |
---|
129 | |
---|
130 | install: all |
---|
131 | cd modgen; make install |
---|
132 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
133 | do \ |
---|
134 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
135 | ( cd $${SUBDIR} && ${MAKE} $@;) \ |
---|
136 | done |
---|