Magellan Linux

Annotation of /tags/grubby-8_20/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 547 - (hide annotations) (download)
Sun Sep 2 00:01:59 2007 UTC (16 years, 7 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/Makefile
File size: 726 byte(s)
-fixed CFLAGS

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 niro 547 CFLAGS = -Wall -g $(OPTCFLAGS) -DVERSION=\"$(VERSION)\"
8 niro 532 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