author | laurent |
Mon, 06 Jun 2011 11:01:47 +0200 | |
changeset 312 | 29add821207d |
parent 279 | c0453b7f99df |
permissions | -rwxr-xr-x |
279
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
1 |
# 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:
258
diff
changeset
|
2 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
3 |
# 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:
258
diff
changeset
|
4 |
# 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:
258
diff
changeset
|
5 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
6 |
# 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:
258
diff
changeset
|
7 |
# 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:
258
diff
changeset
|
8 |
# 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:
258
diff
changeset
|
9 |
# (at your option) any later version. |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
10 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
11 |
# 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:
258
diff
changeset
|
12 |
# 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:
258
diff
changeset
|
13 |
# 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:
258
diff
changeset
|
14 |
# GNU General Public License for more details. |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
15 |
# |
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
258
diff
changeset
|
16 |
# 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:
258
diff
changeset
|
17 |
# 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:
258
diff
changeset
|
18 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
19 |
# include the system specific Makefile |
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
15
diff
changeset
|
20 |
include ../Makefile.$(shell uname) |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
21 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
22 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
23 |
|
257 | 24 |
default: all |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
25 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
26 |
all: iec.flex.o iec.y.o stage1_2.o |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
27 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
28 |
clean: |
159 | 29 |
echo > Makefile.depend |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
30 |
-rm -f iec.flex.c iec.y.cc iec.y.hh iec.y.output |
68 | 31 |
-rm -f iec.noerrorcheck.y |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
32 |
-rm -f test_flex |
172 | 33 |
-rm -f stage1_2.o |
34 |
-rm -f iec.y.o |
|
35 |
-rm -f iec.flex.o |
|
258
d7d92b2f87e9
Merging my Huge change with Edouards/Laurents version
Mario de Sousa <msousa@fe.up.pt>
diff
changeset
|
36 |
-rm -f Makefile.depend |
172 | 37 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
38 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
39 |
CFLAGS += -I. -I../* -I../../absyntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
40 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
41 |
iec.flex.c: iec.flex |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
42 |
flex -oiec.flex.c iec.flex |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
43 |
|
258
d7d92b2f87e9
Merging my Huge change with Edouards/Laurents version
Mario de Sousa <msousa@fe.up.pt>
diff
changeset
|
44 |
stage1_2.cc: iec.y.hh |
d7d92b2f87e9
Merging my Huge change with Edouards/Laurents version
Mario de Sousa <msousa@fe.up.pt>
diff
changeset
|
45 |
stage1_2.o: stage1_2.cc |
172 | 46 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
47 |
iec.flex.o: iec.y.hh iec.flex.c |
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
15
diff
changeset
|
48 |
$(CXX) -c iec.flex.c -D DEFAULT_LIBDIR='"$(IECLIBDIR)"' $(CFLAGS) |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
49 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
50 |
iec.y.hh iec.y.cc: iec.y |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
51 |
bison -d -v -o iec.y.cc iec.y |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
52 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
53 |
iec.y.o: iec.y.cc iec.y.hh |
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
15
diff
changeset
|
54 |
$(CXX) -c iec.y.cc $(CFLAGS) |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
55 |
|
68 | 56 |
noerrorcheck: iec.y |
57 |
sed '/ERROR_CHECK_BEGIN/,/ERROR_CHECK_END/ d' iec.y > iec.noerrorcheck.y |
|
58 |
flex -oiec.flex.c iec.flex |
|
59 |
$(CXX) -c iec.flex.c -D DEFAULT_LIBDIR='"$(IECLIBDIR)"' $(CFLAGS) |
|
60 |
bison -d -v -o iec.y.cc iec.noerrorcheck.y |
|
61 |
$(CXX) -c iec.y.cc $(CFLAGS) |
|
62 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
63 |
#how to make things from other directories if they are missing |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
64 |
../% /%: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
65 |
$(MAKE) -C $(@D) $(@F) |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
66 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
67 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
68 |
Makefile.depend depend: |
243 | 69 |
$(CXX) -MM -MG -I. *.cc \ |
70 |
| sed 's/:/ Makefile.depend:/' > Makefile.depend |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
71 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
72 |
include Makefile.depend |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
0
diff
changeset
|
73 |
|
243 | 74 |