Contents of /tags/grubby-8_40_20170706/Makefile
Parent Directory | Revision Log
Revision 1864 -
(show annotations)
(download)
Mon Jul 2 13:20:31 2012 UTC (12 years, 2 months ago) by niro
Original Path: trunk/grubby/Makefile
File size: 1734 byte(s)
Mon Jul 2 13:20:31 2012 UTC (12 years, 2 months ago) by niro
Original Path: trunk/grubby/Makefile
File size: 1734 byte(s)
Fix uninitialized variable error.
1 | # |
2 | # Makefile |
3 | # |
4 | # Copyright 2007-2009 Red Hat, Inc. All rights reserved. |
5 | # |
6 | # This program is free software; you can redistribute it and/or modify |
7 | # it under the terms of the GNU General Public License as published by |
8 | # the Free Software Foundation; either version 2 of the License, or |
9 | # (at your option) any later version. |
10 | # |
11 | # This program is distributed in the hope that it will be useful, |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | # GNU General Public License for more details. |
15 | # |
16 | # You should have received a copy of the GNU General Public License |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | # |
19 | |
20 | VERSION=$(shell cat VERSION) |
21 | |
22 | TARGETS = grubby |
23 | OBJECTS = grubby.o |
24 | |
25 | CC = gcc |
26 | RPM_OPT_FLAGS := -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector |
27 | CFLAGS += $(RPM_OPT_FLAGS) -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wno-unused-function -ggdb |
28 | LDFLAGS := |
29 | |
30 | grubby_LIBS = -lblkid -lpopt |
31 | |
32 | mandir = usr/share/man |
33 | |
34 | all: grubby |
35 | |
36 | debug : clean |
37 | $(MAKE) CFLAGS="${CFLAGS} -DDEBUG=1" all |
38 | |
39 | %.o : %.c |
40 | $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -c -o $@ $< |
41 | |
42 | test: all |
43 | @export TOPDIR=$(TOPDIR) |
44 | @./test.sh |
45 | |
46 | install: all |
47 | mkdir -p $(DESTDIR)/sbin |
48 | mkdir -p $(DESTDIR)/$(mandir)/man8 |
49 | install -m 755 new-kernel-pkg $(DESTDIR)/sbin |
50 | install -m 644 new-kernel-pkg.8 $(DESTDIR)/$(mandir)/man8 |
51 | install -m 755 installkernel $(DESTDIR)/sbin |
52 | install -m 644 installkernel.8 $(DESTDIR)/$(mandir)/man8 |
53 | if [ -f grubby ]; then \ |
54 | install -m 755 grubby $(DESTDIR)/sbin ; \ |
55 | install -m 644 grubby.8 $(DESTDIR)/$(mandir)/man8 ; \ |
56 | fi |
57 | |
58 | grubby:: $(OBJECTS) |
59 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS) |
60 | |
61 | clean: |
62 | rm -f *.o grubby *~ |