1 # This works mainly on my box for now
2 export LD_LIBRARY_PATH=$(GRAS_ROOT)/lib
4 all: 1-bones.output 2-simple.output 3-args.output
9 # Lesson 1: simple bones of project
10 ########################################
12 1-bones.output: 1-bones_client 1-bones_server 1-bones_simulator
13 echo '$$ ./test_client' > $@
14 ./1-bones_client >> $@ 2>&1
15 echo '$$ ./test_server' >> $@
16 ./1-bones_server >> $@ 2>&1
17 echo '$$ ./test_simulator platform.xml test.xml' >> $@
18 ./1-bones_simulator gtut-platform.xml test.xml >> $@ 2>&1
21 1-bones_client 1-bones_server 1-bones_simulator: _1-bones_client.c _1-bones_server.c _1-bones_simulator.c
24 _1-bones_client.c _1-bones_server.c _1-bones_simulator.c: 1-bones.c test.xml
25 ../../tools/gras/gras_stub_generator 1-bones test.xml >/dev/null
28 if [ -e 1-bones.mk ] ; then make -f 1-bones.mk clean; fi
29 rm -f _1-bones_client.c _1-bones_server.c _1-bones_simulator.c 1-bones.trace 1-bones.mk
31 # Lesson 2: simple message exchange
32 ########################################
34 2-simple.output: 2-simple_client 2-simple_server 2-simple_simulator
35 echo '$$ ./test_simulator platform.xml test.xml' > $@
36 ./2-simple_simulator gtut-platform.xml test.xml >> $@ 2>&1
39 2-simple_client 2-simple_server 2-simple_simulator: _2-simple_client.c _2-simple_server.c _2-simple_simulator.c
42 _2-simple_client.c _2-simple_server.c _2-simple_simulator.c: 2-simple.c test.xml
43 ../../tools/gras/gras_stub_generator 2-simple test.xml >/dev/null
46 if [ -e 2-simple.mk ] ; then make -f 2-simple.mk clean; fi
47 rm -f _2-simple_client.c _2-simple_server.c _2-simple_simulator.c 2-simple.trace 2-simple.mk
49 # Lesson 3: passing args to processes
50 ########################################
52 3-args.output: 3-args_client 3-args_server 3-args_simulator
53 echo '$$ ./test_server 12345 & ./test_client 127.0.0.1 12345' > $@
54 ./3-args_server 12345 >> $@ 2>&1&
55 ./3-args_client 127.0.0.1 12345 >> $@ 2>&1
57 echo '$$ ./test_simulator platform.xml test.xml' >> $@
58 ./3-args_simulator gtut-platform.xml 3-args.xml >> $@ 2>&1
61 3-args_client 3-args_server 3-args_simulator: _3-args_client.c _3-args_server.c _3-args_simulator.c
64 _3-args_client.c _3-args_server.c _3-args_simulator.c: 3-args.c test.xml
65 ../../tools/gras/gras_stub_generator 3-args test.xml >/dev/null
68 if [ -e 3-args.mk ] ; then make -f 3-args.mk clean; fi
69 rm -f _3-args_client.c _3-args_server.c _3-args_simulator.c 3-args.trace 3-args.mk