stage1_2/Makefile
author Edouard TISSERANT <edouard.tisserant@gmail.com>
Sun, 29 Nov 2009 19:09:56 +0100
changeset 218 413842f6152f
parent 172 bfa2e7806d7d
child 243 bdfee1f5be9e
child 257 90782e241346
permissions -rwxr-xr-x
added files to ignore in hgignore
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
15
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
     8
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
     9
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    10
clean:
159
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 68
diff changeset
    11
	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
    12
	-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
    13
	-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
    14
	-rm -f test_flex
172
bfa2e7806d7d Fixed (again) some Makefile quirks.
etisserant
parents: 159
diff changeset
    15
	-rm -f stage1_2.o
bfa2e7806d7d Fixed (again) some Makefile quirks.
etisserant
parents: 159
diff changeset
    16
	-rm -f iec.y.o
bfa2e7806d7d Fixed (again) some Makefile quirks.
etisserant
parents: 159
diff changeset
    17
	-rm -f iec.flex.o
bfa2e7806d7d Fixed (again) some Makefile quirks.
etisserant
parents: 159
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
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    20
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
    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
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
    23
	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
    24
172
bfa2e7806d7d Fixed (again) some Makefile quirks.
etisserant
parents: 159
diff changeset
    25
stage1_2.cc: iec.y.hh
bfa2e7806d7d Fixed (again) some Makefile quirks.
etisserant
parents: 159
diff changeset
    26
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    27
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
    28
	$(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
    29
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    30
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
    31
	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
    32
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    33
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
    34
	$(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
    35
68
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    36
noerrorcheck: iec.y
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    37
	sed '/ERROR_CHECK_BEGIN/,/ERROR_CHECK_END/ d' iec.y > iec.noerrorcheck.y
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    38
	flex -oiec.flex.c iec.flex
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    39
	$(CXX) -c iec.flex.c -D DEFAULT_LIBDIR='"$(IECLIBDIR)"' $(CFLAGS)
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    40
	bison -d -v -o iec.y.cc iec.noerrorcheck.y
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    41
	$(CXX) -c iec.y.cc $(CFLAGS)
b0a43002dcac Adding basic error checking.
mario
parents: 40
diff changeset
    42
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    43
#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
    44
../% /%:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    45
	$(MAKE) -C $(@D) $(@F)
15
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    46
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    47
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    48
Makefile.depend depend:
159
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 68
diff changeset
    49
	$(CXX) -MM -MG -I. *.cc > Makefile.depend
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 68
diff changeset
    50
	#| perl -pe 's/:/ Makefile.depend:/' > Makefile.depend
15
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    51
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    52
include Makefile.depend
0b472e25eb16 Adding changes to make the compiler compatible with bison ver 2.3
mario
parents: 0
diff changeset
    53