1 | ################################################################# |
---|
2 | ### |
---|
3 | ### Makefile for Singular-modules |
---|
4 | ### |
---|
5 | ### $Id: Makefile.in,v 1.19 2006-01-06 10:59:56 Singular 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 | install_bindir = @bindir@ |
---|
22 | # Singular libs go here |
---|
23 | includedir = @includedir@ |
---|
24 | INC_SRC = ${topsrcdir}/Singular |
---|
25 | SINGUNAME = @SINGUNAME@ |
---|
26 | install_bindir = ${install_prefix}/${SINGUNAME}/MOD |
---|
27 | |
---|
28 | ## |
---|
29 | ## various programs |
---|
30 | ## |
---|
31 | CC = @CC@ |
---|
32 | CXX = @CXX@ |
---|
33 | #LEXP = @LEXP@ |
---|
34 | PERL = @PERL@ |
---|
35 | BISON = bison |
---|
36 | @SET_MAKE@ |
---|
37 | INSTALL = ./install-sh -c |
---|
38 | INSTALL_PROGRAM = ${INSTALL} |
---|
39 | INSTALL_DATA = ${INSTALL} -m 644 |
---|
40 | MKINSTALLDIRS = ./mkinstalldirs |
---|
41 | MODGEN = ${srcdir}/modgen/modgen |
---|
42 | |
---|
43 | ## |
---|
44 | ## compiler and linker options |
---|
45 | ## |
---|
46 | CFLAGS = @CFLAGS@ -pipe -I${srcdir} -I${INC_SRC} |
---|
47 | CXXFLAGS = @CXXFLAGS@ -pipe |
---|
48 | #CXXTEMPLFLAGS = @CXXTEMPLFLAGS@ |
---|
49 | CPPFLAGS = -I${srcdir} @CPPFLAGS@ -I${includedir} -I${INC_SRC} |
---|
50 | DEFS = @DEFS@ -DNDEBUG |
---|
51 | LDFLAGS = @LDFLAGS@ # @LD_DYNAMIC@ |
---|
52 | #STATIC_LDFLAGS = @STATIC_LDFLAGS@ |
---|
53 | #LIBS = @NEED_LIBS@ |
---|
54 | |
---|
55 | ## |
---|
56 | ## End configuration dependend stuff |
---|
57 | ################################################################# |
---|
58 | ## |
---|
59 | ## compiler and linker options |
---|
60 | ## |
---|
61 | CFLAGS += ${DEFS} |
---|
62 | |
---|
63 | #ifndef ix86-Win |
---|
64 | MOD_FILES = loctriv |
---|
65 | #MOD_DIRS = kernel |
---|
66 | MOD_DIRS = |
---|
67 | #else |
---|
68 | MOD_FILES = |
---|
69 | MOD_DIRS = |
---|
70 | #endif |
---|
71 | |
---|
72 | ## |
---|
73 | ## |
---|
74 | ## |
---|
75 | |
---|
76 | all: modgen mod_prepare modules |
---|
77 | |
---|
78 | mod_prepare: modgen/modgen |
---|
79 | for file in ${MOD_FILES}; do \ |
---|
80 | if test -d $${file}; then \ |
---|
81 | echo Directory $${file} exists! Ignoring $${file}; \ |
---|
82 | echo Use make mod_clean or remove directory by hand; \ |
---|
83 | else \ |
---|
84 | ${MODGEN} $${file}.mod >$${file}.log ;\ |
---|
85 | fi; \ |
---|
86 | done |
---|
87 | |
---|
88 | modgen/modgen: |
---|
89 | cd modgen; ${MAKE} install |
---|
90 | |
---|
91 | modules: mod_prepare |
---|
92 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
93 | do \ |
---|
94 | if test -d $${SUBDIR}; then \ |
---|
95 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
96 | ( cd $${SUBDIR} && ${MAKE} ;) \ |
---|
97 | fi;\ |
---|
98 | if test ! -d $${SUBDIR}; then \ |
---|
99 | echo directory $${SUBDIR} does not exist!; \ |
---|
100 | fi;\ |
---|
101 | done |
---|
102 | |
---|
103 | clean: |
---|
104 | rm -f *.o *.lo *.so* *.la *~ core |
---|
105 | ( cd modgen && ${MAKE} $@; ) |
---|
106 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
107 | do \ |
---|
108 | if test -d $${SUBDIR}; then \ |
---|
109 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
110 | if [ -e "$${SUBDIR}/Makefile" ]; then (cd $${SUBDIR}; $(MAKE) $@) fi \ |
---|
111 | fi; \ |
---|
112 | done |
---|
113 | |
---|
114 | mod_clean: |
---|
115 | for SUBDIR in ${MOD_FILES}; \ |
---|
116 | do \ |
---|
117 | if test -d $${SUBDIR}; then \ |
---|
118 | echo removing $${SUBDIR};\ |
---|
119 | rm -rf $${SUBDIR}; \ |
---|
120 | fi; \ |
---|
121 | done |
---|
122 | |
---|
123 | for SUBDIR in ${MOD_DIRS}; \ |
---|
124 | do \ |
---|
125 | if test -d $${SUBDIR}; then \ |
---|
126 | echo ${MAKE} clean in $${SUBDIR}; \ |
---|
127 | if [ -e "$${SUBDIR}/Makefile" ]; then (cd $${SUBDIR}; $(MAKE) clean;) fi \ |
---|
128 | fi; \ |
---|
129 | done |
---|
130 | |
---|
131 | distclean: clean mod_clean |
---|
132 | ( cd modgen && ${MAKE} clean ) |
---|
133 | for SUBDIR in ${MOD_DIRS}; \ |
---|
134 | do \ |
---|
135 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
136 | if [ -e "$${SUBDIR}/Makefile" ]; then (cd $${SUBDIR}; $(MAKE) clean;) fi \ |
---|
137 | done |
---|
138 | rm -f Makefile |
---|
139 | |
---|
140 | install bindist: all |
---|
141 | (cd modgen; ${MAKE} $@) |
---|
142 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
143 | do \ |
---|
144 | echo ${MAKE} $@ in $${SUBDIR}; \ |
---|
145 | ( cd $${SUBDIR} && ${MAKE} $@;) || true; \ |
---|
146 | done |
---|
147 | |
---|
148 | install-bindist: all |
---|
149 | (cd modgen; ${MAKE} install_bindir=${install_bindir} $@) |
---|
150 | for SUBDIR in ${MOD_DIRS} ${MOD_FILES}; \ |
---|
151 | do \ |
---|
152 | echo ${MAKE} install_bindir=${install_bindir} $@ in $${SUBDIR}; \ |
---|
153 | ( cd $${SUBDIR} && ${MAKE} install_bindir=${install_bindir} $@;)|| true ;\ |
---|
154 | done |
---|