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