author | mjsousa |
Sat, 29 Nov 2014 13:43:20 +0000 | |
changeset 952 | e984cfdf3b10 |
parent 279 | c0453b7f99df |
permissions | -rwxr-xr-x |
41
8998c8b24b60
First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents:
diff
changeset
|
1 |
#!/bin/bash |
279
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
2 |
# matiec - a compiler for the programming languages defined in IEC 61131-3 |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
3 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
4 |
# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt) |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
5 |
# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
6 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
7 |
# This program is free software: you can redistribute it and/or modify |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
8 |
# it under the terms of the GNU General Public License as published by |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
9 |
# the Free Software Foundation, either version 3 of the License, or |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
10 |
# (at your option) any later version. |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
11 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
12 |
# This program is distributed in the hope that it will be useful, |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
15 |
# GNU General Public License for more details. |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
16 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
18 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
19 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
132
diff
changeset
|
20 |
# Shell script to build test for unix likes |
41
8998c8b24b60
First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents:
diff
changeset
|
21 |
|
44 | 22 |
STFILE=$1 |
23 |
||
24 |
shift |
|
25 |
||
43 | 26 |
CFLAGS=$* |
41
8998c8b24b60
First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents:
diff
changeset
|
27 |
|
55
8b7a21820737
Started support for long long (LL suffix) 64 bit literals on 32 bit platforms (unfinished)
etisserant
parents:
44
diff
changeset
|
28 |
|
8b7a21820737
Started support for long long (LL suffix) 64 bit literals on 32 bit platforms (unfinished)
etisserant
parents:
44
diff
changeset
|
29 |
CC=gcc |
8b7a21820737
Started support for long long (LL suffix) 64 bit literals on 32 bit platforms (unfinished)
etisserant
parents:
44
diff
changeset
|
30 |
#CC=i686-mingw32-gcc |
8b7a21820737
Started support for long long (LL suffix) 64 bit literals on 32 bit platforms (unfinished)
etisserant
parents:
44
diff
changeset
|
31 |
|
132 | 32 |
../iec2c $STFILE -I ../lib |
43 | 33 |
#2>/dev/null |
41
8998c8b24b60
First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents:
diff
changeset
|
34 |
|
55
8b7a21820737
Started support for long long (LL suffix) 64 bit literals on 32 bit platforms (unfinished)
etisserant
parents:
44
diff
changeset
|
35 |
$CC -I ../lib -c STD_RESSOURCE.c $CFLAGS |
41
8998c8b24b60
First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents:
diff
changeset
|
36 |
|
55
8b7a21820737
Started support for long long (LL suffix) 64 bit literals on 32 bit platforms (unfinished)
etisserant
parents:
44
diff
changeset
|
37 |
$CC -I ../lib -c STD_CONF.c $CFLAGS |
43 | 38 |
|
57
db9cadaab2ea
Now generated SoftPLC compiles with mingw32 and run windows.
etisserant
parents:
55
diff
changeset
|
39 |
$CC -I ../lib -c plc.c $CFLAGS |
db9cadaab2ea
Now generated SoftPLC compiles with mingw32 and run windows.
etisserant
parents:
55
diff
changeset
|
40 |
|
db9cadaab2ea
Now generated SoftPLC compiles with mingw32 and run windows.
etisserant
parents:
55
diff
changeset
|
41 |
$CC -I ../lib main.c STD_CONF.o STD_RESSOURCE.o plc.o $CFLAGS -l rt -o test |