blob: 49b67c67a282ec0f319a19f15ef2e92b2ebfbed0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
CROSS=
#CROSS=arm-linux-
LDFLAGS=-s
-MANDIR=/usr/man
+MANDIR=/usr/share/man
path = $(subst :, ,$(PATH))
diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
@@ -44,9 +44,11 @@
msvc: msvc.o
minit-update: minit-update.o split.o openreadclose.o
serdo: serdo.o
-
shutdown: shutdown.o split.o openreadclose.o opendevconsole.o
- $(DIET) $(CROSS)$(CC) $(LDFLAGS) -o shutdown $^
+pidfilehack: pidfilehack.o
+hard-reboot: hard-reboot.o
+write_proc: write_proc.o
+killall5: killall5.o
%.o: %.c
$(DIET) $(CROSS)$(CC) $(CFLAGS) -c $<
@@ -61,22 +63,11 @@
test: test.c
gcc -nostdlib -o $@ $^ -I../dietlibc/include ../dietlibc/start.o ../dietlibc/dietlibc.a
-pidfilehack: pidfilehack.c
- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^
-
-hard-reboot: hard-reboot.c
- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^
-
-write_proc: write_proc.c
- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^
-
-killall5: killall5.c
- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^
-
install-files:
install -d $(DESTDIR)/etc/minit $(DESTDIR)/sbin $(DESTDIR)/bin $(DESTDIR)$(MANDIR)/man8
- install minit pidfilehack $(DESTDIR)/sbin
+ install minit killall5 pidfilehack $(DESTDIR)/sbin
install write_proc hard-reboot minit-update $(DESTDIR)/sbin
+ install listpids $(DESTDIR)/sbin/minit-list
install msvc serdo $(DESTDIR)/bin
install -m 4750 shutdown $(DESTDIR)/sbin
test -f $(DESTDIR)/sbin/init || ln $(DESTDIR)/sbin/minit $(DESTDIR)/sbin/init
--- a/serdo.c
+++ b/serdo.c
@@ -10,6 +10,7 @@
#define MAXENV 256
char* envp[MAXENV+2];
int envc;
+extern char **environ;
int continueonerror;
|