Magellan Linux

Contents of /trunk/magellan-initscripts/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 362 - (show annotations) (download)
Wed Apr 12 22:45:40 2006 UTC (18 years, 6 months ago) by niro
File size: 3001 byte(s)
added a Makefile to make out live easier :p

1 # Magellan Initscripts
2 # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/Makefile,v 1.1 2006-04-12 22:45:40 niro Exp $
3
4 CC=gcc
5 CFLAGS=-Os -Wall
6 LDFLAGS=-s
7
8 DESTDIR=
9
10 sysconfdir=/etc
11 libdir=/lib
12 sbindir=/sbin
13 rcdir=$(sysconfdir)/rc.d
14 initdir=$(rcdir)/init.d
15
16 all: start-stop-daemon
17
18 start-stop-daemon: src/start-stop-daemon.o
19 $(CC) $(CFLAGS) -o start-stop-daemon src/start-stop-daemon.o $(LDFLAGS)
20
21 src/start-stop-daemon.o: src/start-stop-daemon.c src/headers.h
22
23 clean:
24 rm -f src/*.o
25 if [ -f start-stop-daemon ]; then rm start-stop-daemon; fi
26
27 create-dirs:
28 install -d -m 0755 $(DESTDIR)$(sysconfdir)
29 install -d -m 0755 $(DESTDIR)$(sysconfdir)/conf.d
30 install -d -m 0755 $(DESTDIR)$(sysconfdir)/modules.autoload.d
31 install -d -m 0755 $(DESTDIR)$(sysconfdir)/modules.d
32 install -d -m 0755 $(DESTDIR)$(sysconfdir)/sysconfig
33 install -d -m 0755 $(DESTDIR)$(rcdir)/rc0.d
34 install -d -m 0755 $(DESTDIR)$(rcdir)/rc1.d
35 install -d -m 0755 $(DESTDIR)$(rcdir)/rc2.d
36 install -d -m 0755 $(DESTDIR)$(rcdir)/rc3.d
37 install -d -m 0755 $(DESTDIR)$(rcdir)/rc4.d
38 install -d -m 0755 $(DESTDIR)$(rcdir)/rc5.d
39 install -d -m 0755 $(DESTDIR)$(rcdir)/rc6.d
40 install -d -m 0755 $(DESTDIR)$(rcdir)/rcsysinit.d
41 install -d -m 0755 $(DESTDIR)$(initdir)
42 install -d -m 0755 $(DESTDIR)$(libdir)/udev-state
43 install -d -m 0755 $(DESTDIR)$(sbindir)
44
45 install-etc:
46 for file in DIR_COLORS \
47 fstab \
48 group \
49 hostname \
50 hosts \
51 inittab \
52 inputrc \
53 issue \
54 passwd \
55 profile \
56 protocols \
57 rc.config \
58 services \
59 shells; \
60 do \
61 install -m 0644 etc/$${file} $(DESTDIR)$(sysconfdir); \
62 done
63 echo "$$(date +%Y%m%d)-cvs" > $(DESTDIR)$(sysconfdir)/mageversion
64
65
66 install-confd:
67 install -m 0644 etc/conf.d/kernel $(DESTDIR)$(sysconfdir)/conf.d
68 install -m 0644 etc/conf.d/net.eth0 $(DESTDIR)$(sysconfdir)/conf.d
69 install -m 0644 etc/sysconfig/rc $(DESTDIR)$(sysconfdir)/sysconfig
70
71 install-modulesd:
72 install -m 0644 etc/modules.autoload.d/kernel-2.4 \
73 $(DESTDIR)$(sysconfdir)/modules.autoload.d
74 install -m 0644 etc/modules.autoload.d/kernel-2.6 \
75 $(DESTDIR)$(sysconfdir)/modules.autoload.d
76 install -m 0644 etc/modules.d/aliases $(DESTDIR)$(sysconfdir)/modules.d
77 install -m 0644 etc/modules.d/i386 $(DESTDIR)$(sysconfdir)/modules.d
78
79 install-initd:
80 for script in checkfs \
81 cleanfs \
82 consolefont \
83 functions \
84 halt \
85 hwdetect \
86 loadkeys \
87 localnet \
88 modules \
89 mountfs \
90 network \
91 rc \
92 reboot \
93 sendsignals \
94 setclock \
95 swap \
96 template; \
97 do \
98 install -m 0755 etc/rc.d/init.d/$${script} $(DESTDIR)$(initdir)/${script}; \
99 done
100
101
102 install-udevd:
103 install -m 0644 lib/udev-state/devices.tar.bz2 $(DESTDIR)$(libdir)/udev-state
104
105 install-bins:
106 install -m 0755 start-stop-daemon $(DESTDIR)$(sbindir)
107 install -m 0755 sbin/modules-update $(DESTDIR)$(sbindir)
108 install -m 0755 sbin/rc-config $(DESTDIR)$(sbindir)
109
110 install: create-dirs \
111 install-etc \
112 install-confd \
113 install-modulesd \
114 install-initd \
115 install-udevd \
116 install-bins
117
118 .PHONY: all install