autotools: Use non-recursive make
[petitboot] / discover / grub2 / Makefile.am
1 #  This program is free software; you can redistribute it and/or modify
2 #  it under the terms of the GNU General Public License as published by
3 #  the Free Software Foundation; version 2 of the License.
4 #
5 #  This program is distributed in the hope that it will be useful,
6 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8 #  GNU General Public License for more details.
9 #
10 #  You should have received a copy of the GNU General Public License
11 #  along with this program; if not, write to the Free Software
12 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
13 #
14
15 noinst_PROGRAMS += discover/grub2/grub2-parser.ro
16
17 discover/grub2/grub2-parser.ro$(EXEEXT): \
18                 $(discover_grub2_grub2_parser_ro_OBJECTS)
19         $(LD) -r -o $@ $^
20
21 discover_grub2_grub2_parser_ro_SOURCES = \
22         discover/grub2/builtins.c \
23         discover/grub2/env.c \
24         discover/grub2/grub2.h \
25         discover/grub2/grub2.c \
26         discover/grub2/lexer.l \
27         discover/grub2/parser.y \
28         discover/grub2/script.c
29
30 BUILT_SOURCES += \
31         discover/grub2/parser.c \
32         discover/grub2/parser.h \
33         discover/grub2/lexer.h \
34         discover/grub2/lexer.c
35
36 CLEANFILES += \
37         discover/grub2/parser.c \
38         discover/grub2/parser.h \
39         discover/grub2/lexer.c \
40         discover/grub2/lexer.h
41
42
43 discover_grub2_grub2_parser_ro_CPPFLAGS = \
44         $(AM_CPPFLAGS) \
45         -I$(top_srcdir)/discover/grub2 \
46         -I$(top_builddir)/discover/grub2
47
48
49 # ylwrap doesn't handle flex header files well; use our own rule here.
50 discover/grub2/lexer.h discover/grub2/lexer.c: \
51                 $(top_srcdir)/discover/grub2/lexer.l
52         $(AM_V_LEX)$(LEXCOMPILE) --header-file=discover/grub2/lexer.h \
53                                        -o discover/grub2/lexer.c $^
54
55 # We need to loosen our warnings for the generated lexer code.
56 discover/grub2/%lexer.o discover/grub2/lexer.o: \
57                 AM_CFLAGS += -Wno-unused-parameter -Wno-missing-prototypes \
58                                -Wno-missing-declarations
59
60 $(discover_grub2_grub2_parser_ro_OBJECTS): discover/grub2/parser.h