Annotation of /trunk/grubby/Makefile
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (17 years ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/Makefile
File size: 723 byte(s)
Sat Sep 1 22:45:15 2007 UTC (17 years ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/Makefile
File size: 723 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | niro | 532 | VERSION=$(shell cat ../VERSION) |
2 | |||
3 | ARCH := $(patsubst i%86,i386,$(shell uname -m)) | ||
4 | ARCH := $(patsubst sparc%,sparc,$(ARCH)) | ||
5 | ARCH := $(patsubst ppc%,ppc,$(ARCH)) | ||
6 | |||
7 | CFLAGS = -Wall -g $(CFLAGS) -DVERSION=\"$(VERSION)\" | ||
8 | LDFLAGS = -g | ||
9 | |||
10 | LOADLIBES = -lpopt | ||
11 | |||
12 | all: grubby | ||
13 | |||
14 | test: all | ||
15 | @./test.sh | ||
16 | |||
17 | install: all | ||
18 | mkdir -p $(DESTDIR)/sbin | ||
19 | mkdir -p $(DESTDIR)/usr/share/man/man8 | ||
20 | install -m 755 new-kernel-pkg $(DESTDIR)/sbin | ||
21 | if [ -f grubby ]; then \ | ||
22 | install -m 755 grubby $(DESTDIR)/sbin ; \ | ||
23 | install -m 644 grubby.8 $(DESTDIR)/usr/share/man/man8 ; \ | ||
24 | fi | ||
25 | |||
26 | grubby: grubby.o mount_by_label.o | ||
27 | $(CC) -o $@ $^ -Wl,-Bstatic $(LOADLIBES) -Wl,-Bdynamic $(CFLAGS) $(LDFLAGS) | ||
28 | |||
29 | %.o: %.c | ||
30 | $(CC) -c $(CFLAGS) -o $@ $< | ||
31 | |||
32 | clean: | ||
33 | rm -f grubby *.o |