source: Sophya/trunk/SophyaExt/XephemAstroLib/create_smakefile.csh@ 4023

Last change on this file since 4023 was 3087, checked in by cmv, 19 years ago

creation par csh de smakefile/Makefile pour compile avec make non-gnu cmv 29/09/2006

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/csh
2
3rm -f smakefile Makefile maketemp
4touch smakefile Makefile maketemp
5
6set inc = ( *.h )
7set src = ( `ls -1 *.c | grep -v testxephem` )
8set obj
9foreach f ( $src )
10 set obj = ( $obj ${f:r}.o )
11end
12
13echo '' >> maketemp
14echo 'all: libxastro.a' >> maketemp
15echo '' >> maketemp
16echo 'clean:' >> maketemp
17echo ' rm -f libxastro.a *.o testxephem' >> maketemp
18echo '' >> maketemp
19echo 'OBJASTRO = '${obj} >> maketemp
20echo '' >> maketemp
21echo 'libxastro.a : $(OBJASTRO)' >> maketemp
22echo ' $(AR) $(ARFLAGS) $@ $?' >> maketemp
23echo '' >> maketemp
24
25foreach f ( $obj )
26 set c = ${f:r}.c
27 echo "${f}: ${c} ${inc}" >> maketemp
28 echo ' $(CCOMPILE) -o $@' $c >> maketemp
29 echo '' >> maketemp
30end
31
32echo 'testxephem: testxephem.o' >> maketemp
33echo ' $(CLINK) -o $@ testxephem.o -L./ -lxastro -lc -lm' >> maketemp
34echo '' >> maketemp
35echo "testxephem.o: testxephem.c astro.h" >> maketemp
36echo ' $(CCOMPILE) -o $@ testxephem.c' >> maketemp
37echo '' >> maketemp
38
39echo 'include $(SOPHYABASE)/include/sophyamake.inc' >> smakefile
40cat maketemp >> smakefile
41
42echo 'include ../BuildMgr/sophyamake.inc' >> Makefile
43cat maketemp >> Makefile
44
45rm -f maketemp
46
47exit 0
Note: See TracBrowser for help on using the repository browser.