Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sven Gestegård Robertz
LabComm
Commits
fb8d0935
Commit
fb8d0935
authored
Dec 14, 2011
by
Sven Robertz
Browse files
added compilation of dependencies to the compile scripts
parent
4583884b
Changes
5
Hide whitespace changes
Inline
Side-by-side
examples/simple/README
View file @
fb8d0935
NB! Before trying to build and run this example, make sure you have built the LabComm compiler
by running "ant jar" in the main directory (../../ seen from here).
NB! Before trying to build and run examples, make sure you have built the LabComm compiler
by running "ant jar" in the main directory (../../ seen from here) and compiled the labcomm
descriptions needed. The compile.sh script does this.
This is a very simple example with one labcomm file (simple.lc) defining two samples.
Example source code: Encoders and decoders written in Java and C.
...
...
examples/simple/compile.sh
View file @
fb8d0935
(
cd
../../lib/c
;
make
)
(
cd
../../
;
ant jar
)
java
-jar
../../labComm.jar
--java
=
gen
--c
=
gen/simple.c
--h
=
gen/simple.h simple.lc
...
...
examples/simple/datagram/thr_compile.sh
View file @
fb8d0935
(
cd
../../../lib/c
;
make
)
#(cd ../../../lib/c; make)
(
cd
..
;
sh compile.sh
)
gcc
-o
thr_example
-L
../../../lib/c
-I
.
-I
..
-I
../../../lib/c thr_example.c ../gen/simple.c
-llabcomm
#gcc -o thr_example -L ../../../lib/c -I . -I .. -I ../../../lib/c thr_example.c ../gen/simple.c ../../../lib/c/labcomm_thr_reader_writer.c ../../../lib/c/ThrottleDrv/*.c -llabcomm
examples/simple/datagram/udp_compile.sh
View file @
fb8d0935
(
cd
../../../lib/c
;
make
)
#
(cd ../../../lib/c; make)
gcc
-g
-o
udp_encoder
-L
../../../lib/c
-I
.
-I
..
-I
../../../lib/c udp_encoder.c ../gen/simple.c ../../../lib/c/labcomm_udp_reader_writer.c udp_hack.c
-llabcomm
(
cd
..
;
sh compile.sh
)
gcc
-g
-o
udp_decoder
-L
../../../lib/c
-I
.
-I
..
-I
../../../lib/c udp_decoder.c ../gen/simple.c ../../../lib/c/labcomm_udp_reader_writer.c udp_hack.c
-llabcomm
gcc
-g
-o
udp_encoder
-L
../../../lib/c
-I
.
-I
..
-I
../../../lib/c udp_encoder.c ../gen/simple.c
-llabcomm
gcc
-g
-o
udp_decoder
-L
../../../lib/c
-I
.
-I
..
-I
../../../lib/c udp_decoder.c ../gen/simple.c
-llabcomm
lib/c/Makefile
View file @
fb8d0935
CC
=
gcc
CFLAGS
=
-g
liblabcomm.a
:
labcomm.o labcomm_fd_reader_writer.o labcomm_udp_reader_writer.o labcomm_thr_reader_writer.o ethaddr.o ThrottleDrv/ethernet_drv.o ThrottleDrv/throttle_drv.o
liblabcomm.a
:
labcomm.o labcomm_fd_reader_writer.o labcomm_udp_reader_writer.o
udp_hack.o
labcomm_thr_reader_writer.o ethaddr.o ThrottleDrv/ethernet_drv.o ThrottleDrv/throttle_drv.o
# ar -r liblabcomm.a labcomm.o labcomm_fd_reader_writer.o ethaddr.o
ar
-r
liblabcomm.a
$^
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment