diff options
Diffstat (limited to 'bitbake/lib/bb/parse/parse_c/Makefile')
-rw-r--r-- | bitbake/lib/bb/parse/parse_c/Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/bitbake/lib/bb/parse/parse_c/Makefile b/bitbake/lib/bb/parse/parse_c/Makefile new file mode 100644 index 0000000000..9eb7ce9d08 --- /dev/null +++ b/bitbake/lib/bb/parse/parse_c/Makefile | |||
@@ -0,0 +1,36 @@ | |||
1 | |||
2 | test: bitbakec.so | ||
3 | python test.py | ||
4 | |||
5 | bitbakescanner.cc: bitbakescanner.l | ||
6 | flex -t bitbakescanner.l > bitbakescanner.cc | ||
7 | |||
8 | bitbakeparser.cc: bitbakeparser.y python_output.h | ||
9 | lemon bitbakeparser.y | ||
10 | mv bitbakeparser.c bitbakeparser.cc | ||
11 | |||
12 | bitbakec.c: bitbakec.pyx | ||
13 | pyrexc bitbakec.pyx | ||
14 | |||
15 | bitbakec-processed.c: bitbakec.c | ||
16 | cat bitbakec.c | sed -e"s/__pyx_f_8bitbakec_//" > bitbakec-processed.c | ||
17 | |||
18 | bitbakec.o: bitbakec-processed.c | ||
19 | gcc -c bitbakec-processed.c -o bitbakec.o -fPIC -I/usr/include/python2.4 | ||
20 | |||
21 | bitbakeparser.o: bitbakeparser.cc | ||
22 | g++ -c bitbakeparser.cc -fPIC -I/usr/include/python2.4 | ||
23 | |||
24 | bitbakescanner.o: bitbakescanner.cc | ||
25 | g++ -c bitbakescanner.cc -fPIC -I/usr/include/python2.4 | ||
26 | |||
27 | bitbakec.so: bitbakec.o bitbakeparser.o bitbakescanner.o | ||
28 | g++ -shared -fPIC bitbakeparser.o bitbakescanner.o bitbakec.o -o bitbakec.so | ||
29 | |||
30 | clean: | ||
31 | rm *.out | ||
32 | rm *.cc | ||
33 | rm bitbakec.c | ||
34 | rm bitbakec-processed.c | ||
35 | rm *.o | ||
36 | rm *.so | ||