# ******************************************************************* # Makefile pour les modules de # /home/matawin/martinb/mcs/SENTIERS # # ENVIRONNEMENT : SOLARIS (Modula-2) # # fichier ecrit par Luc De Bellefeuille, Benoit Martin # cette version : 1 Mars 1995 # ******************************************************************* mcslib = /home/matawin/stochas/mcslib simod = /home/matawin/stochas/simod/mcs s = /home/matawin/stochas/sentiers/mcs t = /home/matawin/stochas/mylib/mcs/tcode options = -cfg:c linker_options = -cfg:c -lnam:/usr/ucb/ld -llib:$(mcslib)/clib.o:-lc debug = -dbg optim = r = O = $(options) $(optim) D = $(debug) L = $(linker_options) MYLIB = -l:$(mcslib)/libmylib.a LIBS = -l:$(mcslib)/libsentier.a -l:$(mcslib)/libmylib.a libmylib.a = $(mcslib)/libmylib.a libsentier.a = $(mcslib)/libsentier.a supint.lnk = $s/supint.lnk supconv.lnk = $s/supconv.lnk suparith.lnk = $s/suparith.lnk suprand.lnk = $s/suprand.lnk supfact.lnk = $s/supfact.lnk supint.sym = $s/supint.sym supconv.sym = $s/supconv.sym suparith.sym = $s/suparith.sym suprand.sym = $s/suprand.sym supfact.sym = $s/supfact.sym supint.def = $s/supint.def supconv.def = $s/supconv.def suparith.def = $s/suparith.def suprand.def = $s/suprand.def supfact.def = $s/supfact.def modules = $(supint.lnk) $(supconv.lnk) $(suparith.lnk) $(suprand.lnk) \ $(supfact.lnk) gmult.lnk all: $(modules) mess1 sentiers_library mess2 @ echo # ******************************************************************* # MODULES # ******************************************************************* supint: $(supint.lnk) $r supint.lnk: $(supint.lnk) $r supint.sym: $(supint.sym) $r supint.def: $(supint.def) $r $(supint.lnk): $s/supint.mod $(supint.sym) $(libmylib.a) mc $s/supint.mod $O -a:$s $(MYLIB) $(supint.sym): $(supint.def) mc $(supint.def) $O -a:$s $(supint.def): $s/SUPINT.tex $t $s/SUPINT.tex $@ supconv: $(supconv.lnk) $r supconv.lnk: $(supconv.lnk) $r supconv.sym: $(supconv.sym) $r supconv.def: $(supconv.def) $r $(supconv.lnk): $s/supconv.mod $(supconv.sym) $(supint.sym) \ $(libmylib.a) mc $s/supconv.mod $O -a:$s $(MYLIB) $(supconv.sym): $(supconv.def) $(supint.sym) mc $(supconv.def) $O -a:$s $(supconv.def): $s/SUPCONV.tex $t $s/SUPCONV.tex $@ suparith: $(suparith.lnk) $r suparith.lnk: $(suparith.lnk) $r suparith.sym: $(suparith.sym) $r suparith.def: $(suparith.def) $r $(suparith.lnk): $s/suparith.mod $(suparith.sym) $(supint.sym) \ $(supconv.sym) $(libmylib.a) mc $s/suparith.mod $O -a:$s $(MYLIB) $(suparith.sym): $(suparith.def) $(supint.sym) mc $(suparith.def) $O -a:$s $(suparith.def): $s/SUPARITH.tex $t $s/SUPARITH.tex $@ suprand: $(suprand.lnk) $r suprand.lnk: $(suprand.lnk) $r suprand.sym: $(suprand.sym) $r suprand.def: $(suprand.def) $r $(suprand.lnk): $s/suprand.mod $(suprand.sym) $(supint.sym) \ $(suparith.sym) $(libmylib.a) mc $s/suprand.mod $O -a:$s $(MYLIB) $(suprand.sym): $(suprand.def) $(supint.sym) mc $(suprand.def) $O -a:$s $(suprand.def): $s/SUPRAND.tex $t $s/SUPRAND.tex $@ supfact: $(supfact.lnk) $r supfact.lnk: $(supfact.lnk) $r supfact.sym: $(supfact.sym) $r supfact.def: $(supfact.def) $r $(supfact.lnk): $s/supfact.mod $(supfact.sym) $(supint.sym) \ $(supconv.sym) $(suparith.sym) $(suprand.sym) \ $(libmylib.a) mc $s/supfact.mod $O -a:$s $(MYLIB) $(supfact.sym): $(supfact.def) $(supint.sym) mc $(supfact.def) $O -a:$s $(supfact.def): $s/SUPFACT.tex $t $s/SUPFACT.tex $@ supfact.pri: $s/supfact.pri $r $s/supfact.pri: $s/genprim @ echo @ echo "On produit le fichier supfact.pri ..." @ echo @ $s/genprim @ echo "termine!" @ echo genprim: $s/genprim $r $s/genprim: $s/genprim.mod $(libmylib.a) @ echo @ echo "On genere le programme GENPRIM ..." @ echo mc $s/genprim.mod $O $(MYLIB) -a:$s ml $s/genprim $L $(MYLIB) -a:$s @ echo @ echo "termine!" @ echo gmult.lnk: $s/gmult.lnk $r gmult.sym: $s/gmult.sym $r gmult.def: $s/gmult.def $r gmult.mod: $s/gmult.mod $r $s/gmult.lnk: $s/gmult.mod $s/gmult.sym $(supint.sym) $(suparith.sym) mc $s/gmult.mod $O -a:$s $s/gmult.sym: $s/gmult.def $(supint.sym) mc $s/gmult.def $O -a:$s $s/gmult.def: $s/gmultdef.tex $t $s/gmultdef.tex $@ $s/gmult.mod: $s/gmultmod.tex $t $s/gmultmod.tex $@ # ******************************************************************* # messages # ******************************************************************* mess1: @ echo @ echo "Tous les modules de sentiers sont a jour." @ echo @ echo @ echo "Verification de la librairie libsentier.a ..." @ echo mess2: @ echo @ echo "Pour compiler les autres modules, c'est-a-dire" @ echo "les programmes tests executables ..." @ echo " essai , fact , format , nfact et testv" @ echo @ echo "faire:" @ echo " make " @ echo @ echo "ou encore (pour les avoir tous en une seule commande)" @ echo @ echo ' make all_tests' @ echo # ******************************************************************* # SENTIERS_LIBRARY # ******************************************************************* sentiers_library: $(libsentier.a) @ echo @ echo "La librairie est a jour." @ echo @ echo "Pour l'utiliser, il faut fournir a la commande" @ echo "de compilation les options:" @ echo @ echo " $(LIBS)" @ echo $(libsentier.a): $(supint.sym) $(supint.lnk) $(supconv.sym) \ $(supconv.lnk) $(suparith.sym) \ $(suparith.lnk) $(suprand.sym) \ $(suprand.lnk) $(supfact.sym) \ $(supfact.lnk) $s/gmult.sym $s/gmult.lnk @ echo @ echo "La librairie n'est pas a jour ou n'existe pas." @ echo "Generation de la nouvelle librairie ..." @ echo @ rm -f $@ @ mar -c:$@ $(supint.sym) $(supint.lnk) $(supconv.sym) \ $(supconv.lnk) $(suparith.sym) \ $(suparith.lnk) $(suprand.sym) \ $(suprand.lnk) $(supfact.sym) \ $(supfact.lnk) $s/gmult.sym $s/gmult.lnk @ echo @ echo "TERMINE !" @ echo @ echo "Contenu de la librairie:" @ echo "========================" @ mar -s:$@ @ echo # ******************************************************************* # EXEMPLES # ******************************************************************* all_tests: $s/essai $s/fact $s/format $s/nfact $s/testv @ echo essai: $s/essai $r essai.lnk: $s/essai.lnk $r $s/essai: $s/essai.lnk $(libmylib.a) $(libsentier.a) ml $@ $L $(LIBS) $s/essai.lnk: $s/essai.mod $(libmylib.a) $(libsentier.a) mc $s/essai.mod $O $(LIBS) fact: $s/fact $r fact.lnk: $s/fact.lnk $r $s/fact: $s/fact.lnk $s/supfact.pri $(libmylib.a) $(libsentier.a) ml $@ $L $(LIBS) $s/fact.lnk: $s/fact.mod $(libmylib.a) $(libsentier.a) mc $s/fact.mod $O $(LIBS) format: $s/format $r format.lnk: $s/format.lnk $r $s/format: $s/format.lnk $(libmylib.a) $(libsentier.a) ml $@ $L $(LIBS) $s/format.lnk: $s/format.mod $(libmylib.a) $(libsentier.a) mc $s/format.mod $O $(LIBS) nfact: $s/nfact $r nfact.lnk: $s/nfact.lnk $r $s/nfact: $s/nfact.lnk $(libmylib.a) $(libsentier.a) ml $@ $L $(LIBS) $s/nfact.lnk: $s/nfact.mod $(libmylib.a) $(libsentier.a) mc $s/nfact.mod $O $(LIBS) $s/nfact.mod: $s/nfact.tex $t $s/nfact.tex $@ testv: $s/testv $r testv.lnk: $s/testv.lnk $r $s/testv: $s/testv.lnk $(libmylib.a) $(libsentier.a) \ $(simod)/stat.lnk ml $@ $L $(LIBS) -a:$(simod) $s/testv.lnk: $s/testv.mod $(libmylib.a) $(libsentier.a) \ $(simod)/stat.sym mc $s/testv.mod $O $(LIBS) -a:$(simod) # ********** ********** **********FIN********** ********** **********