equal
deleted
inserted
replaced
|
1 # include the system specific Makefile |
|
2 #include ../../../Makefile.$(shell uname) |
|
3 |
|
4 |
|
5 |
|
6 default: all |
|
7 |
|
8 .PHONY: iec.flex |
|
9 |
|
10 all: iec.flex.o iec.y.o |
|
11 |
|
12 clean: |
|
13 -rm -f *.o Makefile.depend |
|
14 -rm -f iec.flex.c iec.y.cc iec.y.hh iec.y.output |
|
15 -rm -f test_flex |
|
16 |
|
17 #get warnings, debugging information and optimization |
|
18 CFLAGS = -Wall -pedantic -Wpointer-arith -Wwrite-strings |
|
19 # CFLAGS += -Werror |
|
20 |
|
21 CFLAGS += -ggdb -O3 -funroll-loops |
|
22 # Note: if the optimizer crashes, we'll leave out the -O3 for those files |
|
23 |
|
24 CFLAGS += -I. -I../* -I../../absyntax |
|
25 |
|
26 test_flex: iec.flex.c iec.y.hh |
|
27 $(CXX) -o test_flex.o -c iec.flex.c -DTEST_MAIN $(CFLAGS) |
|
28 $(CXX) -o test_flex test_flex.o |
|
29 # $(CXX) -o test_flex test_flex.o ../util/symtable.o -DTEST_MAIN |
|
30 |
|
31 iec.flex.c: iec.flex |
|
32 flex -oiec.flex.c iec.flex |
|
33 |
|
34 iec.flex.o: iec.y.hh iec.flex.c |
|
35 $(CXX) -c iec.flex.c -D LIBDIRECTORY='"$(IECLIBDIR)"' $(CFLAGS) |
|
36 |
|
37 iec.y.hh iec.y.cc: iec.y |
|
38 bison -d -v -o iec.y.cc iec.y |
|
39 |
|
40 iec.y.o: iec.y.cc iec.y.hh |
|
41 $(CXX) -c iec.y.cc -D LIBDIRECTORY='"$(IECLIBDIR)"' $(CFLAGS) |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 #how to make things from other directories if they are missing |
|
48 ../% /%: |
|
49 $(MAKE) -C $(@D) $(@F) |