Contents of /tags/mkinitrd-6_1_8/grubby/Makefile
Parent Directory | Revision Log
Revision 916 -
(show annotations)
(download)
Wed Oct 28 00:17:50 2009 UTC (14 years, 11 months ago) by niro
File size: 1414 byte(s)
Wed Oct 28 00:17:50 2009 UTC (14 years, 11 months ago) by niro
File size: 1414 byte(s)
tagged 'mkinitrd-6_1_8'
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 | CFLAGS := $(CFLAGS) $(RPM_OPT_FLAGS) -DVERSION='"$(VERSION)"' -Wall -Werror |
26 | LDFLAGS := |
27 | |
28 | grubby_LIBS = -lblkid -lpopt |
29 | grubby_LIBS += $(shell pkg-config --libs glib-2.0) |
30 | |
31 | all: grubby |
32 | |
33 | test: all |
34 | @export TOPDIR=$(TOPDIR) |
35 | @./test.sh |
36 | |
37 | install: all |
38 | mkdir -p $(DESTDIR)/sbin |
39 | mkdir -p $(DESTDIR)/$(mandir)/man8 |
40 | install -m 755 new-kernel-pkg $(DESTDIR)/sbin |
41 | install -m 755 installkernel $(DESTDIR)/sbin |
42 | if [ -f grubby ]; then \ |
43 | install -m 755 grubby $(DESTDIR)/sbin ; \ |
44 | install -m 644 grubby.8 $(DESTDIR)/$(mandir)/man8 ; \ |
45 | fi |
46 | |
47 | grubby:: $(OBJECTS) |
48 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS) |
49 | |
50 | clean: |
51 | rm -f *.o grubby *~ |