Commit 713dd66b authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

merge from master

parents 0ebaa10d 59729683
...@@ -6,9 +6,9 @@ lib/c/liblabcomm.so.1 ...@@ -6,9 +6,9 @@ lib/c/liblabcomm.so.1
lib/c/liblabcomm2006.so.1 lib/c/liblabcomm2006.so.1
lib/c/liblabcomm2006.so lib/c/liblabcomm2006.so
lib/c/liblabcomm2006.a lib/c/liblabcomm2006.a
lib/c/liblabcomm20141009.so.1 lib/c/liblabcomm2014.so.1
lib/c/liblabcomm20141009.so lib/c/liblabcomm2014.so
lib/c/liblabcomm20141009.a lib/c/liblabcomm2014.a
lib/c/test/test_labcomm lib/c/test/test_labcomm
lib/c/test/test_labcomm_basic_type_encoding lib/c/test/test_labcomm_basic_type_encoding
lib/c/test/test_labcomm_copy lib/c/test/test_labcomm_copy
...@@ -16,7 +16,7 @@ lib/c/test/test_labcomm_generated_encoding ...@@ -16,7 +16,7 @@ lib/c/test/test_labcomm_generated_encoding
lib/c/test/test_labcomm_pthread_scheduler lib/c/test/test_labcomm_pthread_scheduler
lib/c/test/test_signature_numbers lib/c/test/test_signature_numbers
compiler/AST/ compiler/AST/
compiler/labComm.jar compiler/labcomm_compiler.jar
encoded_data encoded_data
encoded_data06 encoded_data06
gen gen
......
...@@ -77,7 +77,7 @@ classpath="tools/jastadd2.jar"/> ...@@ -77,7 +77,7 @@ classpath="tools/jastadd2.jar"/>
<!-- delete all .class files recursively --> <!-- delete all .class files recursively -->
<delete> <delete>
<fileset dir="." includes="**/*.class"/> <fileset dir="." includes="**/*.class"/>
<fileset dir="." includes="labComm.jar"/> <fileset dir="." includes="labcomm_compiler.jar"/>
</delete> </delete>
</target> </target>
......
#dummy script to test the on-the-fly compilation #dummy script to test the on-the-fly compilation
java -jar ../../compiler/labComm.jar --java=gen --javapackage=gen simple.lc java -jar ../../compiler/labcomm_compiler.jar --java=gen --javapackage=gen simple.lc
javac -cp .:gen:../../lib/java/labcomm.jar gen/*.java javac -cp .:gen:../../lib/java/labcomm.jar gen/*.java
...@@ -9,7 +9,7 @@ javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java ...@@ -9,7 +9,7 @@ javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java
javac -cp .:gen:../../lib/java/labcomm.jar test/StaticDecoder.java javac -cp .:gen:../../lib/java/labcomm.jar test/StaticDecoder.java
# compile dynamic part # compile dynamic part
javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java
javac test/HandlerContext.java javac test/HandlerContext.java
...@@ -17,7 +17,7 @@ javac test/HandlerContext.java ...@@ -17,7 +17,7 @@ javac test/HandlerContext.java
java -cp .:gen:../../lib/java//labcomm.jar test.StaticEncoder encoded_data java -cp .:gen:../../lib/java//labcomm.jar test.StaticEncoder encoded_data
# run dynamic part # run dynamic part
java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple.lc handlers2.txt encoded_data dynamic_out java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple.lc handlers2.txt encoded_data dynamic_out
# run static decoder # run static decoder
......
#dummy script to test the on-the-fly compilation #dummy script to test the on-the-fly compilation
java -jar ../../compiler/labComm.jar --java=gen --javapackage=gen simple.lc java -jar ../../compiler/labcomm_compiler.jar --java=gen --javapackage=gen simple.lc
javac -cp .:gen:../../lib/java/labcomm.jar gen/*.java javac -cp .:gen:../../lib/java/labcomm.jar gen/*.java
...@@ -9,7 +9,7 @@ javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java ...@@ -9,7 +9,7 @@ javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java
javac -cp .:gen:../../lib/java/labcomm.jar test/StaticDecoder.java javac -cp .:gen:../../lib/java/labcomm.jar test/StaticDecoder.java
# compile dynamic part # compile dynamic part
javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/DynamicPart.java
javac test/HandlerContext.java javac test/HandlerContext.java
...@@ -17,7 +17,7 @@ javac test/HandlerContext.java ...@@ -17,7 +17,7 @@ javac test/HandlerContext.java
java -cp .:gen:../../lib/java//labcomm.jar test.StaticEncoder encoded_data java -cp .:gen:../../lib/java//labcomm.jar test.StaticEncoder encoded_data
# run dynamic part # run dynamic part
java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple_type.lc handlers_type.txt encoded_data dynamic_out java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.DynamicPart simple_type.lc handlers_type.txt encoded_data dynamic_out
# run static decoder # run static decoder
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# run labcomm compilation # run labcomm compilation
java -jar ../../compiler/labComm.jar --java=gen --javapackage=gen simple.lc java -jar ../../compiler/labcomm_compiler.jar --java=gen --javapackage=gen simple.lc
# compile example programs # compile example programs
javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java javac -cp .:gen:../../lib/java/labcomm.jar test/StaticEncoder.java
......
#dummy script to test the on-the-fly compilation #dummy script to test the on-the-fly compilation
javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java
javac test/HandlerContext.java javac test/HandlerContext.java
java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple.lc handlers2.txt encoded_data java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple.lc handlers2.txt encoded_data
#dummy script to test the on-the-fly compilation #dummy script to test the on-the-fly compilation
javac -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java javac -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test/TestLabcommGen.java
javac test/HandlerContext.java javac test/HandlerContext.java
java -cp .:../../compiler/labComm.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple_type.lc handlers_type.txt encoded_data java -cp .:../../compiler/labcomm_compiler.jar:../../lib/java/labcomm.jar:../../lib/tools/beaver.jar:../../lib/tools/beaver-rt.jar:../../lib/tools/jastadd2.jar:../../lib/tools/JFlex.jar:../../lib/tools/proj.jar test.TestLabcommGen simple_type.lc handlers_type.txt encoded_data
LCDIR=../.. LCDIR=../..
LCC=java -jar ${LCDIR}/compiler/labcomm_compiler.jar LABCOMM_JAR=../../compiler/labcomm_compiler.jar
LABCOMM=java -jar $(LABCOMM_JAR)
CLASSPATH=.:${LCDIR}/lib/java/labcomm.jar CLASSPATH=.:${LCDIR}/lib/java/labcomm.jar
JAVA_PKG=labcommTCPtest JAVA_PKG=labcommTCPtest
SAMPLENAME=foo SAMPLENAME=foo
...@@ -11,7 +12,7 @@ TLCFILE=turtle1 ...@@ -11,7 +12,7 @@ TLCFILE=turtle1
TAUX=turtle_enc.c turtle_dec.c TAUX=turtle_enc.c turtle_dec.c
${JAVA_PKG}/gen/foo.java: ${LCFILE}.lc ${JAVA_PKG}/gen/foo.java: ${LCFILE}.lc
${LCC} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $< ${LABCOMM} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $<
${JAVA_PKG}/gen/${SAMPLENAME}.class: ${JAVA_PKG}/gen/${SAMPLENAME}.java ${JAVA_PKG}/gen/${SAMPLENAME}.class: ${JAVA_PKG}/gen/${SAMPLENAME}.java
javac -cp ${CLASSPATH} $< javac -cp ${CLASSPATH} $<
...@@ -37,14 +38,14 @@ client: client.c ${LCFILE}.c ${AUX} ${AUX:.c=.h} ...@@ -37,14 +38,14 @@ client: client.c ${LCFILE}.c ${AUX} ${AUX:.c=.h}
testserver: testserver.c ${LCFILE}.c ${AUX} ${AUX:.c=.h} testserver: testserver.c ${LCFILE}.c ${AUX} ${AUX:.c=.h}
${CC} -o $@ testserver.c ${AUX} ${LCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm ${CC} -o $@ testserver.c ${AUX} ${LCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm
turtleclient: turtleclient.c ${TLCFILE}.c ${TAUX} ${TAUX:.c=.h} turtleclient: turtleclient.c ${TLCFILE}.c ${TAUX} ${TAUX:.c=.h}
${CC} -o $@ turtleclient.c ${TAUX} ${TLCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm ${CC} -o $@ turtleclient.c ${TAUX} ${TLCFILE}.c -I${LCLIBDIR} -L${LCLIBDIR} -llabcomm
${LCFILE}.c : ${LCFILE}.lc ${LCFILE}.c : ${LCFILE}.lc
${LCC} -C ${LCFILE}.lc ${LABCOMM} -C ${LCFILE}.lc
${TLCFILE}.c : ${TLCFILE}.lc ${TLCFILE}.c : ${TLCFILE}.lc
${LCC} -C ${TLCFILE}.lc ${LABCOMM} -C ${TLCFILE}.lc
all: client testserver ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/client/TestClient.class turtleclient all: client testserver ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/client/TestClient.class turtleclient
......
...@@ -7,15 +7,15 @@ ...@@ -7,15 +7,15 @@
mkdir -p gen mkdir -p gen
java -jar ../../compiler/labcomm_compiler.jar --java=gen --c=gen/simple.c --h=gen/simple.h --python=gen/simple.py simple.lc java -jar ../../compiler/labcomm_compiler.jar --java=gen --c=gen/simple.c --h=gen/simple.h --python=gen/simple.py simple.lc
javac -cp ../../lib/java/labcomm20141009.jar:. gen/*.java Encoder.java Decoder.java javac -cp ../../lib/java/labcomm2014.jar:. gen/*.java Encoder.java Decoder.java
gcc -Wall -Werror -Wno-unused-function \ gcc -Wall -Werror -Wno-unused-function \
-I. -I../../lib/c -L../../lib/c \ -I. -I../../lib/c -L../../lib/c \
-o example_encoder example_encoder.c gen/simple.c \ -o example_encoder example_encoder.c gen/simple.c \
-llabcomm20141009 -Tlabcomm.linkscript -llabcomm2014 -Tlabcomm.linkscript
gcc -Wall -Werror -I . -I ../../lib/c -L../../lib/c \ gcc -Wall -Werror -I . -I ../../lib/c -L../../lib/c \
-o example_decoder example_decoder.c gen/simple.c \ -o example_decoder example_decoder.c gen/simple.c \
-llabcomm20141009 -Tlabcomm.linkscript -llabcomm2014 -Tlabcomm.linkscript
# For version 2006 # For version 2006
......
...@@ -5,7 +5,7 @@ import sys ...@@ -5,7 +5,7 @@ import sys
import simple import simple
if __name__ == '__main__': if __name__ == '__main__':
version = sys.argv[2] if len(sys.argv) == 3 else "LabComm20141009" version = sys.argv[2] if len(sys.argv) == 3 else "LabComm2014"
encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')), version) encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')), version)
encoder.add_decl(simple.theTwoInts.signature) encoder.add_decl(simple.theTwoInts.signature)
encoder.add_decl(simple.IntString.signature) encoder.add_decl(simple.IntString.signature)
......
...@@ -5,17 +5,17 @@ echo "*** Running example for version 2013 ***" ...@@ -5,17 +5,17 @@ echo "*** Running example for version 2013 ***"
echo "********************************************" echo "********************************************"
echo echo
java -cp .:../../lib/java/labcomm20141009.jar:gen Encoder encoded_data java -cp .:../../lib/java/labcomm2014.jar:gen Encoder encoded_data
./example_decoder encoded_data ./example_decoder encoded_data
PYTHONPATH=../../lib/python:gen ./example_encoder.py encoded_data PYTHONPATH=../../lib/python:gen ./example_encoder.py encoded_data
java -cp .:../../lib/java/labcomm20141009.jar:gen Decoder encoded_data java -cp .:../../lib/java/labcomm2014.jar:gen Decoder encoded_data
./example_encoder encoded_data ./example_encoder encoded_data
java -cp .:../../lib/java/labcomm20141009.jar:gen Decoder encoded_data java -cp .:../../lib/java/labcomm2014.jar:gen Decoder encoded_data
echo "running python decoder (from wiki_example):" echo "running python decoder (from wiki_example):"
PYTHONPATH=../../lib/python ../wiki_example/example_decoder.py encoded_data LabComm20141009 PYTHONPATH=../../lib/python ../wiki_example/example_decoder.py encoded_data LabComm2014
echo echo
echo "*******************************************************" echo "*******************************************************"
......
LCDIR=../.. LCDIR=../..
LCCJAR=${LCDIR}/compiler/labcomm_compiler.jar # the LabComm compiler LABCOMM_JAR=../../compiler/labcomm_compiler.jar
LABCOMM=java -jar $(LABCOMM_JAR)
LCLJAR=${LCDIR}/lib/java/labcomm.jar # the LabComm library LCLJAR=${LCDIR}/lib/java/labcomm.jar # the LabComm library
JAVA_PKG=labcommTCPtest JAVA_PKG=labcommTCPtest
...@@ -14,17 +15,16 @@ run : ${JAVA_PKG}/Example.class ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/ ...@@ -14,17 +15,16 @@ run : ${JAVA_PKG}/Example.class ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/
### dependencies and parts #################### ### dependencies and parts ####################
############################################### ###############################################
LCC=java -jar ${LCCJAR}
CLASSPATH=.:${LCLJAR} CLASSPATH=.:${LCLJAR}
${LCCJAR} : ${LABCOMM_JAR} :
cd ${LCDIR} && make make-compiler cd ${LCDIR} && make make-compiler
${LCLJAR} : ${LCLJAR} :
cd ${LCDIR}/lib/java && make labcomm.jar cd ${LCDIR}/lib/java && make labcomm.jar
${JAVA_PKG}/gen/FooSample.java: test.lc ${LCCJAR} ${JAVA_PKG}/gen/FooSample.java: test.lc ${LCCJAR}
${LCC} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $< ${LABCOMM} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $<
${JAVA_PKG}/gen/FooSample.class: ${JAVA_PKG}/gen/FooSample.java test.lc ${LCLJAR} ${JAVA_PKG}/gen/FooSample.class: ${JAVA_PKG}/gen/FooSample.java test.lc ${LCLJAR}
javac -cp ${CLASSPATH} $< javac -cp ${CLASSPATH} $<
......
...@@ -49,11 +49,11 @@ build : ...@@ -49,11 +49,11 @@ build :
${CC} ${CFLAGS} ${LDFLAGS} -Wall -Werror -Wno-unused-function \ ${CC} ${CFLAGS} ${LDFLAGS} -Wall -Werror -Wno-unused-function \
-I. -I${LCDIR}/lib/c -L${LCDIR}/lib/c \ -I. -I${LCDIR}/lib/c -L${LCDIR}/lib/c \
-o example_encoder example_encoder.c ${GENDIR}/test.c \ -o example_encoder example_encoder.c ${GENDIR}/test.c \
-llabcomm20141009 -llabcomm2014
${CC} ${CFLAGS} ${LDFLAGS} -Wall -Werror -I . -I ${LCDIR}/lib/c -L${LCDIR}/lib/c \ ${CC} ${CFLAGS} ${LDFLAGS} -Wall -Werror -I . -I ${LCDIR}/lib/c -L${LCDIR}/lib/c \
-o example_decoder example_decoder.c ${GENDIR}/test.c \ -o example_decoder example_decoder.c ${GENDIR}/test.c \
-llabcomm20141009 -llabcomm2014
buildcs: Encoder.exe Decoder.exe buildcs: Encoder.exe Decoder.exe
...@@ -74,7 +74,7 @@ run: ...@@ -74,7 +74,7 @@ run:
@./example_decoder encoded_data_j @./example_decoder encoded_data_j
@echo "************ running python decoder (from wiki_example):" @echo "************ running python decoder (from wiki_example):"
@PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_j LabComm20141009 @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_j LabComm2014
@echo "************ running C encoder: *****************" @echo "************ running C encoder: *****************"
@./example_encoder encoded_data_c @./example_encoder encoded_data_c
...@@ -86,10 +86,10 @@ run: ...@@ -86,10 +86,10 @@ run:
@./example_decoder encoded_data_c @./example_decoder encoded_data_c
@echo "************ running python decoder (from wiki_example):" @echo "************ running python decoder (from wiki_example):"
@PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm20141009 @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm2014
@echo "************ running python encoder: *****************" @echo "************ running python encoder: *****************"
@PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm20141009 @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm2014
@echo "************ running Java decoder: *****************" @echo "************ running Java decoder: *****************"
@java -cp .:${LCDIR}/lib/java/labcomm.jar:${GENDIR} Decoder encoded_data_p @java -cp .:${LCDIR}/lib/java/labcomm.jar:${GENDIR} Decoder encoded_data_p
...@@ -98,7 +98,7 @@ run: ...@@ -98,7 +98,7 @@ run:
@./example_decoder encoded_data_p @./example_decoder encoded_data_p
@echo "************ running python decoder (from wiki_example):" @echo "************ running python decoder (from wiki_example):"
PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm20141009 PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm2014
runwcs: Encoder.exe Decoder.exe runwcs: Encoder.exe Decoder.exe
export LD_LIBRARY_PATH=${LCDIR}/lib/c/ export LD_LIBRARY_PATH=${LCDIR}/lib/c/
...@@ -132,13 +132,13 @@ runwcs: Encoder.exe Decoder.exe ...@@ -132,13 +132,13 @@ runwcs: Encoder.exe Decoder.exe
@./example_decoder encoded_data_c @./example_decoder encoded_data_c
@echo "************ running python decoder (from wiki_example):" @echo "************ running python decoder (from wiki_example):"
@PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm20141009 @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_c LabComm2014
@echo "************ running C# decoder: *****************" @echo "************ running C# decoder: *****************"
@./Decoder.exe encoded_data_c @./Decoder.exe encoded_data_c
@echo "************ running python encoder: *****************" @echo "************ running python encoder: *****************"
@PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm20141009 @PYTHONPATH=${LCDIR}/lib/python:${GENDIR} ./example_encoder.py encoded_data_p LabComm2014
@echo "************ running Java decoder: *****************" @echo "************ running Java decoder: *****************"
@java -cp .:${LCDIR}/lib/java/labcomm.jar:${GENDIR} Decoder encoded_data_p @java -cp .:${LCDIR}/lib/java/labcomm.jar:${GENDIR} Decoder encoded_data_p
...@@ -147,7 +147,7 @@ runwcs: Encoder.exe Decoder.exe ...@@ -147,7 +147,7 @@ runwcs: Encoder.exe Decoder.exe
@./example_decoder encoded_data_p @./example_decoder encoded_data_p
@echo "************ running python decoder (from wiki_example):" @echo "************ running python decoder (from wiki_example):"
PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm20141009 PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_p LabComm2014
@echo "************ running C# decoder: *****************" @echo "************ running C# decoder: *****************"
@./Decoder.exe encoded_data_p @./Decoder.exe encoded_data_p
...@@ -162,7 +162,7 @@ runwcs: Encoder.exe Decoder.exe ...@@ -162,7 +162,7 @@ runwcs: Encoder.exe Decoder.exe
@./example_decoder encoded_data_cs @./example_decoder encoded_data_cs
@echo "************ running python decoder (from wiki_example):" @echo "************ running python decoder (from wiki_example):"
@PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_cs LabComm20141009 @PYTHONPATH=${LCDIR}/lib/python ../wiki_example/example_decoder.py encoded_data_cs LabComm2014
@echo "************ running C# decoder: *****************" @echo "************ running C# decoder: *****************"
@./Decoder.exe encoded_data_cs @./Decoder.exe encoded_data_cs
......
...@@ -5,7 +5,7 @@ import sys ...@@ -5,7 +5,7 @@ import sys
import test import test
if __name__ == '__main__': if __name__ == '__main__':
version = sys.argv[2] if len(sys.argv) == 3 else "LabComm20141009" version = sys.argv[2] if len(sys.argv) == 3 else "LabComm2014"
encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')), version) encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')), version)
encoder.add_decl(test.twoLines.signature) encoder.add_decl(test.twoLines.signature)
tl = dict( tl = dict(
......
...@@ -4,7 +4,7 @@ import labcomm ...@@ -4,7 +4,7 @@ import labcomm
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
version = sys.argv[2] if len(sys.argv) == 3 else "LabComm20141009" version = sys.argv[2] if len(sys.argv) == 3 else "LabComm2014"
d = labcomm.Decoder(labcomm.StreamReader(open(sys.argv[1])), version) d = labcomm.Decoder(labcomm.StreamReader(open(sys.argv[1])), version)
while True: while True:
......
#!/bin/sh #!/bin/sh
# Auto generate code from .lc file # Auto generate code from .lc file
java -jar ../../compiler/labComm.jar \ java -jar ../../compiler/labcomm_compiler.jar \
--c=example.c --h=example.h \ --c=example.c --h=example.h \
--java=. \ --java=. \
--cs=example.cs \ --cs=example.cs \
......
...@@ -34,7 +34,7 @@ or ...@@ -34,7 +34,7 @@ or
$ VAR Encoder e; $ VAR Encoder e;
$ Init_Encoder e, st; $ Init_Encoder e, st;
This will read/write the version of LabComm to ensure compatibility, current This will read/write the version of LabComm to ensure compatibility, current
version is "LabComm20141009". version is "LabComm2014".
# Initiate the labcomm samples: # Initiate the labcomm samples:
LabComm trusts the application to manage each sample. It requests the samples, LabComm trusts the application to manage each sample. It requests the samples,
......
## Macros ## Macros
include os_compat.mk include os_compat.mk
ALL_DEPS=liblabcomm.a liblabcomm.so.1 liblabcomm2006.a liblabcomm2006.so.1 liblabcomm20141009.a liblabcomm20141009.so.1 ALL_DEPS=liblabcomm.a liblabcomm.so.1 liblabcomm2006.a liblabcomm2006.so.1 liblabcomm2014.a liblabcomm2014.so.1
# TODO: Support for Codesourcery ARM toolchain. # TODO: Support for Codesourcery ARM toolchain.
...@@ -66,10 +66,10 @@ liblabcomm.a: $(OBJS) $(OBJS2006) ...@@ -66,10 +66,10 @@ liblabcomm.a: $(OBJS) $(OBJS2006)
liblabcomm.so.1: $(OBJS:%.o=%.pic.o) $(OBJS2006:%.o=%.pic.o) liblabcomm.so.1: $(OBJS:%.o=%.pic.o) $(OBJS2006:%.o=%.pic.o)
$(call MAKESHARED,$@,$@,$^) $(call MAKESHARED,$@,$@,$^)
liblabcomm20141009.a: $(OBJS) liblabcomm2014.a: $(OBJS)
ar -r $@ $^ ar -r $@ $^
liblabcomm20141009.so.1: $(OBJS:%.o=%.pic.o) liblabcomm2014.so.1: $(OBJS:%.o=%.pic.o)
$(call MAKESHARED,$@,$@,$^) $(call MAKESHARED,$@,$@,$^)
liblabcomm2006.a: $(OBJS2006) liblabcomm2006.a: $(OBJS2006)
...@@ -149,8 +149,8 @@ distclean: clean ...@@ -149,8 +149,8 @@ distclean: clean
$(RM) liblabcomm.a $(RM) liblabcomm.a
$(RM) liblabcomm2006.so.1 $(RM) liblabcomm2006.so.1
$(RM) liblabcomm2006.a $(RM) liblabcomm2006.a
$(RM) liblabcomm20141009.so.1 $(RM) liblabcomm2014.so.1
$(RM) liblabcomm20141009.a $(RM) liblabcomm2014.a
# Extra dependencies # Extra dependencies
$(TEST_DIR)/test_labcomm_basic_type_encoding.o: labcomm_private.h $(TEST_DIR)/test_labcomm_basic_type_encoding.o: labcomm_private.h
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "labcomm_ioctl.h" #include "labcomm_ioctl.h"
#include "labcomm_dynamic_buffer_writer.h" #include "labcomm_dynamic_buffer_writer.h"
#define CURRENT_VERSION "LabComm20141009" #define CURRENT_VERSION "LabComm2014"
/* Unwrapping reader/writer functions */ /* Unwrapping reader/writer functions */
#define UNWRAP_ac(rw, ac, ...) ac #define UNWRAP_ac(rw, ac, ...) ac
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define CURRENT_VERSION "LabComm20141009" #define CURRENT_VERSION "LabComm2014"
#include <errno.h> #include <errno.h>
#include "labcomm.h" #include "labcomm.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment