|
| 1 | +###### |
| 2 | +# |
| 3 | +# HX-2013-03: |
| 4 | +# for compiling a distribution of ATS-Postiats |
| 5 | +# KO-2014-04-09: |
| 6 | +# removing [-T] from [install] as the option is |
| 7 | +# not supported on MacOS |
| 8 | +# IU-2014-04-30: |
| 9 | +# removing the space between -m and the following mode |
| 10 | +# as it is not supported on freeBSD |
| 11 | +# |
| 12 | +###### |
| 13 | + |
| 14 | +CPF=cp -f |
| 15 | +CPR=cp -R |
| 16 | +MVF=mv -f |
| 17 | +RMF=rm -f |
| 18 | +RMRF=rm -rf |
| 19 | + |
| 20 | +###### |
| 21 | + |
| 22 | +MAKE=make |
| 23 | +MAKEJ4=make -j4 |
| 24 | + |
| 25 | +###### |
| 26 | +# |
| 27 | +all:: config.mk |
| 28 | +# |
| 29 | +all:: bin2_tempopt |
| 30 | +all:: lib2_libatsopt |
| 31 | +# |
| 32 | +all:: bin_tempacc |
| 33 | +# all:: bin_myatscc |
| 34 | +# |
| 35 | +all:: ccomp/atslib/lib/libatslib.a |
| 36 | +# |
| 37 | +###### |
| 38 | + |
| 39 | +configure: ; /bin/bash autogen.sh |
| 40 | + |
| 41 | +###### |
| 42 | +# |
| 43 | +# HX: this seems to be working |
| 44 | +# |
| 45 | +# config.mk : configure ; ./configure |
| 46 | +# |
| 47 | +####### |
| 48 | +# |
| 49 | +config.mk: \ |
| 50 | +configure ; \ |
| 51 | +@echo "Please execute './configure'." ; exit 1 ; |
| 52 | +# |
| 53 | +###### |
| 54 | +# |
| 55 | +C3NSTRINTKND=gmpknd |
| 56 | +# |
| 57 | +#C3NSTRINTKND=intknd |
| 58 | +# |
| 59 | +###### |
| 60 | +# |
| 61 | +src_tempopt: ; \ |
| 62 | +$(MAKE) C3NSTRINTKND=$(C3NSTRINTKND) -j4 -C srcgen tempopt |
| 63 | +# |
| 64 | +bin_tempopt: src_tempopt ; $(CPF) srcgen/tempopt bin/tempopt |
| 65 | +# |
| 66 | +###### |
| 67 | +# |
| 68 | +CCOMP=gcc |
| 69 | +# |
| 70 | +GCFLAG= |
| 71 | +#GCFLAG=-D_ATS_NGC |
| 72 | +#GCFLAG=-D_ATS_GCBDW |
| 73 | +#GCFLAG=-D_ATS_GCATS |
| 74 | +# |
| 75 | +CFLAGS= |
| 76 | +LDFLAGS= |
| 77 | +# |
| 78 | +###### |
| 79 | +# |
| 80 | +src2_tempopt: ; \ |
| 81 | +$(MAKEJ4) -C srcgen/CBOOT tempopt \ |
| 82 | +CCOMP=$(CCOMP) GCFLAG=$(GCFLAG) LDFLAGS=$(LDFLAGS) |
| 83 | +# |
| 84 | +bin2_tempopt: src2_tempopt ; $(CPF) srcgen/CBOOT/tempopt bin/tempopt |
| 85 | +# |
| 86 | +###### |
| 87 | + |
| 88 | +utl_tempacc: ; \ |
| 89 | +$(MAKE) -C utils/tempacc copy build clean |
| 90 | +bin_tempacc: utl_tempacc ; \ |
| 91 | +$(MVF) utils/tempacc/BUILD/tempacc bin/tempacc |
| 92 | + |
| 93 | +###### |
| 94 | +# |
| 95 | +src2_libatsopt: ; \ |
| 96 | +$(MAKE) -C srcgen/CBOOT CCOMP=$(CCOMP) libatsopt |
| 97 | +lib2_libatsopt: src2_libatsopt ; \ |
| 98 | +$(CPF) srcgen/CBOOT/libatsopt.a ccomp/atslib/lib/. |
| 99 | +# |
| 100 | +###### |
| 101 | + |
| 102 | +ccomp/atslib/lib/libatslib.a: ; $(MAKE) -C ccomp/atslib atslib |
| 103 | + |
| 104 | +###### |
| 105 | + |
| 106 | +-include config.mk |
| 107 | + |
| 108 | +###### |
| 109 | +# |
| 110 | +# This variable is to be set externally |
| 111 | +# |
| 112 | +DESTDIR := |
| 113 | +# |
| 114 | +###### |
| 115 | + |
| 116 | +export TEMPTORYHOME |
| 117 | +export TEMPLIBHOME |
| 118 | + |
| 119 | +###### |
| 120 | + |
| 121 | +bindir2 := $(DESTDIR)$(bindir) |
| 122 | +TEMPTORYLIBHOME := $(DESTDIR)$(TEMPLIBHOME) |
| 123 | + |
| 124 | +###### |
| 125 | +# |
| 126 | +# HX-2011-06-01: |
| 127 | +# This part was originally written by Georg Bauhaus |
| 128 | +# (bauhausATarcorDOTde): It addresses the issue that |
| 129 | +# the [-D] option is not available for $(INSTALL) on MacOSX. |
| 130 | +# |
| 131 | +.PHONY: install_dirs |
| 132 | +.PHONY: install_files |
| 133 | +# |
| 134 | +install: install_files |
| 135 | + |
| 136 | +install_files: \ |
| 137 | + install_files_00 \ |
| 138 | + install_files_10 \ |
| 139 | + install_files_11 \ |
| 140 | + install_files_20 \ |
| 141 | + install_files_30 \ |
| 142 | + install_files_31 \ |
| 143 | + install_files_40 \ |
| 144 | + install_files_50 \ |
| 145 | + |
| 146 | +install_dirs: ; \ |
| 147 | + cd "$(abs_top_srcdir)" && \ |
| 148 | + $(MKDIR_P) $(TEMPTORYLIBHOME)/bin && \ |
| 149 | + if [ ! -d $(bindir2) ] ; then $(MKDIR_P) $(bindir2) ; fi && \ |
| 150 | + for x in share ccomp prelude libats contrib ; do \ |
| 151 | + find "$$x" -type d -exec $(MKDIR_P) $(TEMPTORYLIBHOME)/\{} \; -print; \ |
| 152 | + done |
| 153 | + |
| 154 | +install_files_00: install_dirs ; \ |
| 155 | + for x in share ccomp/runtime prelude libats contrib ; do \ |
| 156 | + cd "$(abs_top_srcdir)" && \ |
| 157 | + $(INSTALL) -d $(TEMPTORYLIBHOME)/"$$x" && \ |
| 158 | + find "$$x" -type l -exec $(CPR) \{} $(TEMPTORYLIBHOME)/\{} \; -print && \ |
| 159 | + find "$$x" -type f -exec $(INSTALL) -m644 \{} $(TEMPTORYLIBHOME)/\{} \; -print; \ |
| 160 | + done |
| 161 | + |
| 162 | +install_files_10: bin/tempacc ; \ |
| 163 | + $(INSTALL) -m755 $< $(TEMPTORYLIBHOME)/bin/tempacc && echo $< |
| 164 | +# install_files_11: bin/myatscc ; \ |
| 165 | +# $(INSTALL) -m755 $< $(TEMPTORYLIBHOME)/bin/myatscc && echo $< |
| 166 | +install_files_20: bin/tempopt ; \ |
| 167 | + $(INSTALL) -m755 $< $(TEMPTORYLIBHOME)/bin/tempopt && echo $< |
| 168 | +# install_files_30: bin/tempacc_env.sh ; \ |
| 169 | +# $(INSTALL) -m755 $< $(bindir2)/tempacc && echo $< |
| 170 | +# install_files_31: bin/myatscc_env.sh ; \ |
| 171 | +# $(INSTALL) -m755 $< $(bindir2)/myatscc && echo $< |
| 172 | +# install_files_40: bin/tempopt_env.sh ; \ |
| 173 | +# $(INSTALL) -m755 $< $(bindir2)/tempopt && echo $< |
| 174 | + |
| 175 | +install_files_50: ; \ |
| 176 | + for x in \ |
| 177 | + ccomp/atslib/lib/libatslib.a \ |
| 178 | + ccomp/atslib/lib64/libatslib.a ; \ |
| 179 | + do \ |
| 180 | + if [ -e "$$x" ] ; then \ |
| 181 | + $(INSTALL) -m755 "$$x" $(TEMPTORYLIBHOME)/"$$x" && echo "$$x"; \ |
| 182 | + fi; \ |
| 183 | + done |
| 184 | + |
| 185 | +###### |
| 186 | +# |
| 187 | +# HX-2017-11-11: |
| 188 | +# Please execute the following |
| 189 | +# command-lines before reinstall |
| 190 | +# |
| 191 | +# make -C ccomp/atslib clean |
| 192 | +# make -C ccomp/atslib atslib |
| 193 | +# |
| 194 | +reinstall_atslib: install_files_50 |
| 195 | +# |
| 196 | +###### |
| 197 | +# |
| 198 | +uninstall:: uninstall_bin |
| 199 | +uninstall:: uninstall_home |
| 200 | +# |
| 201 | +uninstall_bin:: ; $(RMF) $(bindir2)/tempacc |
| 202 | +# uninstall_bin:: ; $(RMF) $(bindir2)/myatscc |
| 203 | +uninstall_bin:: ; $(RMF) $(bindir2)/tempopt |
| 204 | +uninstall_home:: ; $(RMRF) $(TEMPTORYLIBHOME) |
| 205 | +# |
| 206 | +###### |
| 207 | + |
| 208 | +clean:: |
| 209 | +cleanall:: clean |
| 210 | + |
| 211 | +###### |
| 212 | + |
| 213 | +clean:: ; $(RMF) ccomp/atslib/output/*.o |
| 214 | +clean:: ; $(MAKE) -C srcgen/CBOOT -f Makefile clean |
| 215 | + |
| 216 | +###### |
| 217 | + |
| 218 | +cleanall:: ; $(RMF) stamp-h1 |
| 219 | +cleanall:: ; $(RMF) config.mk |
| 220 | +cleanall:: ; $(RMF) config.log |
| 221 | +cleanall:: ; $(RMF) config.status |
| 222 | +cleanall:: ; $(RMRF) autom4te.cache |
| 223 | + |
| 224 | +cleanall:: ; $(RMF) bin/tempacc |
| 225 | +# cleanall:: ; $(RMF) bin/myatscc |
| 226 | +cleanall:: ; $(RMF) bin/tempopt |
| 227 | +cleanall:: ; $(RMF) bin/tempacc_env.sh |
| 228 | +# cleanall:: ; $(RMF) bin/myatscc_env.sh |
| 229 | +cleanall:: ; $(RMF) bin/tempopt_env.sh |
| 230 | + |
| 231 | +cleanall:: ; $(RMF) ccomp/atslib/lib/* |
| 232 | +cleanall:: ; $(RMF) ccomp/atslib/lib64/* |
| 233 | +cleanall:: ; $(RMF) ccomp/atslib/output/* |
| 234 | + |
| 235 | +cleanall:: ; $(MAKE) -C srcgen -f Makefile cleanall |
| 236 | +# cleanall:: ; $(MAKE) -C srcgen/CBOOT -f Makefile cleanall |
| 237 | +cleanall:: ; $(MAKE) -C utils/tempacc -f Makefile cleanall |
| 238 | + |
| 239 | +###### |
| 240 | + |
| 241 | +distclean:: cleanall |
| 242 | + |
| 243 | +###### |
| 244 | + |
| 245 | +###### end of [Makefile_dist] ###### |
0 commit comments