]> git.ozlabs.org Git - petitboot/blob - discover/grub2/Makefile.am
discover/grub2: Implement load_env
[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 AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(DEFAULT_CPPFLAGS)
16
17 AM_CFLAGS = $(DEFAULT_CFLAGS)  \
18         -DPREFIX='"$(prefix)"' \
19         -DPKG_SHARE_DIR='"$(pkgdatadir)"' \
20         -DPKG_SYSCONF_DIR='"$(pkgsysconfdir)"' \
21         -DLOCAL_STATE_DIR='"$(localstatedir)"'
22
23 AM_YFLAGS = -d
24
25 noinst_PROGRAMS = grub2-parser.ro
26
27 grub2-parser.ro$(EXEEXT): $(grub2_parser_ro_OBJECTS)
28         $(LD) -r -o $@ $^
29
30
31 grub2_parser_ro_SOURCES = \
32         builtins.c \
33         env.c \
34         grub2.h \
35         grub2.c \
36         lexer.l \
37         parser.y \
38         script.c \
39         parser.c
40
41 BUILT_SOURCES = parser.h lexer.h
42
43 # ylwrap doesn't handle flex header files well; use our own rule here.
44 lexer.h lexer.c: lexer.l
45         $(LEX) $(LFLAGS) --header-file=lexer.h -o lexer.c $^
46
47 lexer.o: CFLAGS+=-Wno-unused-parameter -Wno-missing-prototypes \
48                        -Wno-missing-declarations
49