stage1_2/Makefile
author lbessard
Fri, 26 Sep 2008 14:42:05 +0200
changeset 146 eef5e62048c7
parent 68 b0a43002dcac
child 159 1e4eb0d48385
permissions -rwxr-xr-x
Adding support for EN/ENO params in function and function blocks (standard function not supported yet)
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     1
# 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
     2
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
     3
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     4
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     5
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     6
default:	all
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     7
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     8
.PHONY: 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
     9
15
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    10
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
    11
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    12
68
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    13
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    14
clean:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    15
	-rm -f *.o Makefile.depend
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    16
	-rm -f iec.flex.c iec.y.cc iec.y.hh iec.y.output
68
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    17
	-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
    18
	-rm -f test_flex
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    19
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    20
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    21
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
    22
68
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    23
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    24
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
test_flex: iec.flex.c iec.y.hh
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    26
	$(CXX) -o test_flex.o -c iec.flex.c -DTEST_MAIN $(CFLAGS)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    27
	$(CXX) -o test_flex test_flex.o
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    28
#	$(CXX) -o test_flex test_flex.o ../util/symtable.o -DTEST_MAIN
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    29
68
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    30
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    31
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    32
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    33
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    34
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
    35
	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
    36
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    37
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
    38
	$(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
    39
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    40
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
    41
	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
    42
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    43
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
    44
	$(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
    45
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    46
68
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    47
noerrorcheck: iec.y
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    48
	sed '/ERROR_CHECK_BEGIN/,/ERROR_CHECK_END/ d' iec.y > iec.noerrorcheck.y
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    49
	flex -oiec.flex.c iec.flex
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    50
	$(CXX) -c iec.flex.c -D DEFAULT_LIBDIR='"$(IECLIBDIR)"' $(CFLAGS)
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    51
	bison -d -v -o iec.y.cc iec.noerrorcheck.y
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    52
	$(CXX) -c iec.y.cc $(CFLAGS)
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    53
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    54
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    55
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    56
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    57
#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
    58
../% /%:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    59
	$(MAKE) -C $(@D) $(@F)
15
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    60
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    61
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    62
Makefile.depend depend:
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    63
	$(CXX) -MM -MG -I. *.cc \
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    64
	  | perl -pe 's/:/ Makefile.depend:/' > Makefile.depend
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    65
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    66
include Makefile.depend
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    67