Add diclaimer of copyright to _osname() manual page.
[unix-history] / sbin / init.chmr / Makefile.chmr
CommitLineData
9a6eb889
NW
1# What you can define:
2# -DDEBUG enables debugging facilities:
3# you can increment debug level with debug keyword in
4# config file, -d option, or by sending SIGUSR1 to init.
5# SIGUSR2 sets debug level to 0.
6# -DUNTRUSTED debugging code: on SIGINT it execs /sbin/init.ori
7# (do this only in singleuser mode !)
8# -DCONFIGURE on startup (and when requested), read /etc/init.conf
9# and set parameters in it.
10# -DFAKE_SYSLOG do not use syslog, but write to /dev/console.
11# This makes it MUCH smaller !
12# -DSMALL do not use perror, but write error codes.
13# Makes it even smaller, but requires -DFAKE_SYSLOG.
14# For the floppy version, compile this with -DFAKE_SYSLOG -DSMALL. If compiled
15# with gcc1, it is not bigger than the original init (20k).
16#
17DEFINES = -DSMALL -DFAKE_SYSLOG
18#DEFINES = -DDEBUG -DCONFIGURE
800ffe89
NW
19#DEFINES = -DDEBUG -DUNTRUSTED -DCONFIGURE
20LDFLAGS =
21CFLAGS = -g -O -Wall -pipe
22LIBS = -lutil
9a6eb889
NW
23SRCS = init.c ttytab.c configure.c cf_table.c utils.c fake_syslog.c
24OBJS = init.o ttytab.o configure.o cf_table.o utils.o fake_syslog.o
800ffe89
NW
25INC = init.h prototypes.h
26BIN = /sbin/init
27BAK = .old
9a6eb889 28MAN = init.8
800ffe89
NW
29#CC = /usr/local/gcc-2.3.3/bin/gcc
30MKDEP = mkdep
31TAGS = ctags
32
33
34all!
35 @[ -f .test ] && exec make test || \
36 exec make init CC="$(CC)" DEFINES="$(DEFINES)" OBJS="$(OBJS)"
37
38
39test! .test
9a6eb889 40 exec make init CC="$(CC)" DEFINES="$(DEFINES) -DTESTRUN"
800ffe89
NW
41
42init: $(OBJS)
43 $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $(OBJS) $(LIBS)
44
45init.0: init.8
46 nroff -mandoc init.8 > init.0
47
48clean!
49 -rm -f $(OBJS) init init.0 .test .depend tags
50
51install! init init.0
52 [ -f $(BIN)$(ORI) ] || mv -f $(BIN) $(BIN)$(ORI)
53 -mv -f $(BIN) $(BIN)$(BAK)
54 install -c -s -o bin -g bin -m 0555 -s init $(BIN)
55 install -c -o bin -g bin -m 0444 init.0 $(MAN)
56 [ -f /etc/init.conf ] || install -c -o bin -g wheel -m 644 init.conf /etc
57
58depend!
59 $(MKDEP) $(DEFINES) $(SRCS)
60
61tags!
62 $(TAGS) $(SRCS)
63
64.test:
65 make clean
66 touch .test
67
68.c.o:
69 $(CC) -c $(CFLAGS) $(DEFINES) $<
70