| Line | |
|---|
| 1 | # Makefile for shutdown / halt / reboot.
|
|---|
| 2 |
|
|---|
| 3 | CFLAGS=$(OPT) -D_MINIX -D_POSIX_SOURCE
|
|---|
| 4 | LDFLAGS=-i
|
|---|
| 5 | CC=exec cc
|
|---|
| 6 |
|
|---|
| 7 | PROGRAMS= shutdown halt tinyhalt
|
|---|
| 8 | MANUALS= shutdown.8 halt.8 reboot.2 reboot.8
|
|---|
| 9 |
|
|---|
| 10 | all: $(PROGRAMS)
|
|---|
| 11 |
|
|---|
| 12 | shutdown: shutdown.o sh_wall.o log.o
|
|---|
| 13 | $(CC) $(LDFLAGS) -o shutdown shutdown.o sh_wall.o log.o
|
|---|
| 14 | install -S 4kw $@
|
|---|
| 15 |
|
|---|
| 16 | halt: halt.o log.o
|
|---|
| 17 | $(CC) $(LDFLAGS) -o halt halt.o log.o
|
|---|
| 18 | install -S 4kw $@
|
|---|
| 19 |
|
|---|
| 20 | tinyhalt: tinyhalt.c
|
|---|
| 21 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $?
|
|---|
| 22 | install -S 4kw $@
|
|---|
| 23 |
|
|---|
| 24 | install: /usr/bin/halt /usr/bin/reboot /usr/bin/shutdown \
|
|---|
| 25 | /bin/halt /bin/reboot
|
|---|
| 26 |
|
|---|
| 27 | /usr/bin/halt: halt
|
|---|
| 28 | install -cs -o root -g operator -m 744 $? $@
|
|---|
| 29 |
|
|---|
| 30 | /usr/bin/reboot: /usr/bin/halt
|
|---|
| 31 | install -l $? $@
|
|---|
| 32 |
|
|---|
| 33 | /usr/bin/shutdown: shutdown
|
|---|
| 34 | install -cs -o root -g operator -m 4754 $? $@
|
|---|
| 35 |
|
|---|
| 36 | /bin/halt: tinyhalt
|
|---|
| 37 | install -cs -o root -g operator -m 744 $? $@
|
|---|
| 38 |
|
|---|
| 39 | /bin/reboot: /bin/halt
|
|---|
| 40 | install -l $? $@
|
|---|
| 41 |
|
|---|
| 42 | clean:
|
|---|
| 43 | rm -f *.o a.out core $(PROGRAMS)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.