run 631 Bytes
Newer Older
Sven Robertz's avatar
Sven Robertz committed
1
2
3
#!/bin/sh

# Auto generate code from .lc file
4
java -jar ../../compiler/labcomm_compiler.jar \
Sven Robertz's avatar
Sven Robertz committed
5
6
7
8
9
10
11
  --c=example.c --h=example.h \
  --java=. \
  --cs=example.cs \
  --python=example.py \
  example.lc

# Compile executables
Sven Robertz's avatar
Sven Robertz committed
12
13
(cd ../../lib/c; make liblabcomm.a)

Sven Robertz's avatar
Sven Robertz committed
14
15
gcc -o example_encoder -I ../../lib/c/ \
	example_encoder.c \
Sven Robertz's avatar
Sven Robertz committed
16
17
18
        example.c \
	../../lib/c/liblabcomm.a 

Sven Robertz's avatar
Sven Robertz committed
19
20
21
22
23
javac -cp ../../lib/java:. *.java

# Run through all executables (c->java->Python)
./example_encoder one two
java -cp ../../lib/java:. example_decoder_encoder example.encoded example.javaencoded
24
PYTHONPATH=../../lib/python ./example_decoder.py example.javaencoded