Contents of /trunk/mkinitrd-magellan/Makefile
Parent Directory
|
Revision Log
Revision 1343 -
(show annotations)
(download)
Fri Jun 3 21:18:44 2011 UTC (12 years, 11 months ago) by niro
File size: 1945 byte(s)
Fri Jun 3 21:18:44 2011 UTC (12 years, 11 months ago) by niro
File size: 1945 byte(s)
-do not include grubby anymore, using an extra package for easier dependency handling with upcoming dracut
1 | VERSION=$(shell cat VERSION) |
2 | |
3 | ARCH := $(patsubst i%86,i386,$(shell uname -m)) |
4 | ARCH := $(patsubst sparc%,sparc,$(ARCH)) |
5 | |
6 | SUBDIRS = livecd isolinux |
7 | |
8 | #ifeq ($(ARCH),sparc) |
9 | #SUBDIRS += loadinitrd |
10 | #endif |
11 | |
12 | #ifeq ($(ARCH),i386) |
13 | #SUBDIRS += loadinitrd |
14 | #endif |
15 | |
16 | OPTCFLAGS = $(CFLAGS) |
17 | LINUX_SOURCES=/usr/src/linux |
18 | |
19 | mandir = usr/share/man |
20 | docdir = usr/share/doc/mkinitrd-$(VERSION) |
21 | |
22 | all: |
23 | for n in $(SUBDIRS); do make -C $$n; done |
24 | # use linux sources from default path, not the installed kernel |
25 | ln -snf $(LINUX_SOURCES) klibc/linux |
26 | make -C klibc |
27 | # force chmod +x for scripts in busybox |
28 | chmod +x busybox/scripts/*.sh |
29 | make -C busybox defconfig |
30 | make -C busybox |
31 | sed 's:%VERSIONTAG%:$(VERSION):' < mkinitrd.in > mkinitrd |
32 | |
33 | test: all |
34 | for i in busybox klibc; do make -C $$i test; done |
35 | |
36 | install: |
37 | for n in $(SUBDIRS); do make -C $$n install DESTDIR=$(DESTDIR); done |
38 | for i in etc/conf.d sbin usr/sbin $(mandir)/man8 $(docdir)/busybox $(docdir)/klibc; do \ |
39 | if [ ! -d $(DESTDIR)/$$i ]; then \ |
40 | mkdir -p $(DESTDIR)/$$i; \ |
41 | fi; \ |
42 | done |
43 | install -m755 mkinitrd $(DESTDIR)/sbin/mkinitrd |
44 | chmod 755 $(DESTDIR)/sbin/mkinitrd |
45 | install -m644 mkinitrd.8 $(DESTDIR)/$(mandir)/man8/mkinitrd.8 |
46 | install -m644 mkinitrd.confd $(DESTDIR)/etc/conf.d/mkinitrd |
47 | install -m755 busybox/busybox $(DESTDIR)/usr/sbin/busybox.mkinitrd |
48 | cat busybox/LICENSE | gzip -9 > $(DESTDIR)/$(docdir)/busybox/LICENSE.gz |
49 | cat busybox/README | gzip -9 > $(DESTDIR)/$(docdir)/busybox/README.gz |
50 | cat busybox/TODO | gzip -9 > $(DESTDIR)/$(docdir)/busybox/TODO.gz |
51 | install -m755 klibc/usr/kinit/run-init/static/run-init $(DESTDIR)/usr/sbin/run-init.mkinitrd |
52 | cat klibc/usr/klibc/README | gzip -9 > $(DESTDIR)/$(docdir)/klibc/README.gz |
53 | cat klibc/usr/klibc/LICENSE | gzip -9 > $(DESTDIR)/$(docdir)/klibc/LICENSE.gz |
54 | |
55 | clean: |
56 | for n in $(SUBDIRS) busybox klibc isolinux; do make -C $$n clean; done |
57 | rm -f mkinitrd |
58 | rm -f klibc/linux |
59 | |
60 | mrproper: clean |
61 | make -C busybox mrproper |
62 | make -C klibc mrproper |