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

Last change on this file since 521 was 480, checked in by ansari, 26 years ago

MAJ / PEIDA 3.8 , Reza 20/10/99

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