source: Sophya/trunk/SophyaLib/Mgr/mkmf@ 306

Last change on this file since 306 was 226, checked in by ansari, 26 years ago

MAJ Makefile global et ajout de ttsz - Reza 13/04/99

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/bin/csh
2# $Id: mkmf,v 1.2 1999-04-13 15:11:11 ansari Exp $
3
4# creation de MakefileUser.h a partir de Makefile.h
5echo 'mkmf: Creation de MakefileUser.h'
6cat Makefile.h | awk -f makefileuser.awk >! MakefileUser.h
7
8# creation des liens pour les includes
9echo 'mkmf: Creation des liens (appel mkmflien)'
10./mkmflien
11
12echo 'mkmf: Creation makefile global :'
13rm -f GNUmakefile
14
15echo 'include Mgr/Makefile.h' >> GNUmakefile
16
17echo 'LIBF = ' `sed -e 's/.*/$(LIB)lib&.a/' libdirs` >> GNUmakefile
18echo 'LIBS = -L$(LIB)' `sed -e 's/.*/-l&/' libdirs` '-lm' >> GNUmakefile
19echo 'LIBG = -L$(GLB) -lstdc++' >> GNUmakefile
20
21cat >> GNUmakefile <<EOF
22
23defaut: libs
24
25all: libs PI
26
27
28libs: cxxlibs
29# Dans cet ordre pour les templates de cxx, a cause des dependances
30# pour instantiation automatique/manuels
31
32cxxlibs: Blitz SysTools NTools Samba
33
34EOF
35
36
37# Attention, ne pas changer l'ordre de libnames dependances cxx
38set libnames = (Blitz SysTools NTools Samba)
39set i = 1
40set j = $#libnames ; @ j--
41while ($i <= $#libnames)
42 set f = $libnames[$i]
43 set k = $i ; @ k++
44 if ( -d ../$f ) then
45 set cmd = "./mkmflib $f $libnames[$k-$j]"
46 echo "mkmf: Creation makefile lib $f"
47 echo " execution $cmd"
48 $cmd
49 endif
50 echo '.PHONY: ' $f >> GNUmakefile
51 echo $f':' >> GNUmakefile
52 echo ' if [ -d '$f' ] ; then cd ' $f '; $(MAKE) ; fi' >> GNUmakefile
53 echo ' ' >> GNUmakefile
54 @ i++
55end
56
57
58if ( -d ../PI ) then
59 set cmd = './mkmfPI PI SysTools'
60 echo "mkmf: Creation makefile lib PI"
61 echo " execution $cmd"
62 $cmd
63endif
64if ( -d ../PIext ) then
65 set cmd = './mkmfPI PIext SysTools NTools PI'
66 echo "mkmf: Creation makefile lib PIext"
67 echo " execution $cmd"
68 $cmd
69endif
70echo '.PHONY: PI' >> GNUmakefile
71echo 'PI:' >> GNUmakefile
72echo ' if [ -d PI ] ; then cd PI ; $(MAKE) ; fi' >> GNUmakefile
73echo ' if [ -d PIext ] ; then cd PIext ; $(MAKE) ; fi' >> GNUmakefile
74
75cat Makefile.slb >> GNUmakefile
76
77cat >> GNUmakefile << __END__
78
79clean:
80 if [ -d \$(LIB) ] ; then cd \$(LIB)/. ; rm -f *.a ; fi
81 if [ -d \$(SLB) ] ; then cd \$(SLB)/. ; rm -f *.so ; fi
82 if [ -d \$(OBJ) ] ; then cd \$(OBJ)/. ; rm -f *.o ; fi
83 if [ -d \$(OBJ)/cxxrep ] ; then cd \$(OBJ)/cxxrep/. ; rm -f *.o ; fi
84 if [ -d PI ] ; then cd PI/. ; \$(MAKE) clean ; fi
85
86__END__
87
88mv GNUmakefile ../GNUmakefile
89
90echo '*** mkmf done ***'
91
Note: See TracBrowser for help on using the repository browser.