Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
99ba5a9f81236689645ef25aa824e407835810ba
[simgrid.git] / doc / gtut-files / Makefile
1 # This works mainly on my box for now
2 export LD_LIBRARY_PATH=$(GRAS_ROOT)/lib
3
4 all: 1-bones 2-simple
5
6 veryclean: clean
7         rm *.output
8
9 # Lesson 1: simple bones of project
10 ########################################
11
12 1-bones: 1-bones.output
13 1-bones.output: 1-bones_client 1-bones_server 1-bones_simulator
14         echo '$$ ./test_client'                           > $@ 
15         ./1-bones_client                                 >> $@ 2>&1
16         echo '$$ ./test_server'                          >> $@
17         ./1-bones_server                                 >> $@ 2>&1
18         echo '$$ ./test_simulator platform.xml test.xml' >> $@ 
19         ./1-bones_simulator gtut-platform.xml test.xml   >> $@ 2>&1
20         echo '$$'                                        >> $@ 
21
22 1-bones_client 1-bones_server 1-bones_simulator: _1-bones_client.c _1-bones_server.c _1-bones_simulator.c
23         make -f 1-bones.mk
24
25 _1-bones_client.c _1-bones_server.c _1-bones_simulator.c: 1-bones.c test.xml
26         ../../tools/gras/gras_stub_generator 1-bones test.xml >/dev/null
27
28 clean::
29         if [ -e 1-bones.mk ] ; then make -f 1-bones.mk clean; fi
30         rm -f _1-bones_client.c _1-bones_server.c _1-bones_simulator.c 1-bones.trace 1-bones.mk
31
32 # Lesson 2: simple message exchange
33 ########################################
34
35 2-simple: 2-simple.output
36 2-simple.output: 2-simple_client 2-simple_server 2-simple_simulator
37         echo '$$ ./test_simulator platform.xml test.xml'  > $@
38         ./2-simple_simulator gtut-platform.xml test.xml  >> $@ 2>&1
39         echo '$$'                                        >> $@ 
40
41 2-simple_client 2-simple_server 2-simple_simulator: _2-simple_client.c _2-simple_server.c _2-simple_simulator.c
42         make -f 2-simple.mk
43
44 _2-simple_client.c _2-simple_server.c _2-simple_simulator.c: 2-simple.c test.xml
45         ../../tools/gras/gras_stub_generator 2-simple test.xml >/dev/null
46
47 clean::
48         if [ -e 2-simple.mk ] ; then make -f 2-simple.mk clean; fi
49         rm -f _2-simple_client.c _2-simple_server.c _2-simple_simulator.c 2-simple.trace 2-simple.mk
50
51 .PHONY: 1-bones 2-simple