-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
82 lines (61 loc) · 1.9 KB
/
Makefile.in
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Makefile for sysline (version 1.1 Linux)
# Changing the name has zero effect on other compiling options;
# sysline will however in case of errors report itself with this name.
# Take your pick.
PROGNAME = sysline
#PROGNAME = sysline.termcap
#PROGNAME = sysline.terminfo
##############################################################################
CURDIR := $(shell basename `pwd`)
VERSION = $(CURDIR)
CC = @CC@
OPT =
CFLAGS = -O6 -m486 -Wall @CFLAGS@
LDFLAGS = $(CFLAGS) -s @LDFLAGS@
TERMLIB = @TERMLIB@
UTILITIES = cs
OBJS = sysline.o getloadavg.o mime.o
PROG = $(strip $(PROGNAME))
# note: cs _not_ installed by default
INSTALL_PROGS = $(PROG) # $(UTILITIES)
PROGS_MODE = 555
PROGS_DIR = /usr/bin
MANPG_DIR = /usr/man/man1
INSTALL_MANPG = sysline.1
MANPG_MODE = 644
INSTALL = install
all: $(PROG)
$(PROG): $(OBJS)
$(CC) $(strip $(OPT)) $(LDFLAGS) $(OBJS) -o $(PROG) $(TERMLIB)
sysline.o: sysline.c config.h rwhod.h pathnames.h mime.h sysline.h
@echo Making $(PROGNAME)
$(CC) $(strip $(CFLAGS)) -c -o sysline.o sysline.c
getloadavg.o: getloadavg.c
$(CC) $(CFLAGS) -DHAVE_UNISTD_H -c -o getloadavg.o getloadavg.c
mime.o: mime.c mime.h sysline.h
$(CC) $(CFLAGS) -DHAVE_UNISTD_H -c -o mime.o mime.c
config.h:
touch config.h
pathnames.h:
touch pathnames.h
rwhod.h:
touch rwhod.h
.PHONY: install
install: all
$(INSTALL) -s -m $(PROGS_MODE) $(strip $(INSTALL_PROGS)) $(PROGS_DIR) 2>/dev/null
$(INSTALL) -m $(MANPG_MODE) $(INSTALL_MANPG) $(MANPG_DIR)
ifeq ($(strip $(INSTALL_PROGS)),$(strip $(PROG)))
@echo "note: cs not installed"
endif
.PHONY: clean
clean:
rm -f Makefile config.h \
sysline sysline.termcap sysline.terminfo \
sysline.*.gz $(OBJS) a.out core make.res *~
clobber: clean
distclean: clobber
tar: distclean
cd .. && tar --files-from=$(CURDIR)/Manifest -cvf - | gzip -9 >$(CURDIR)/$(VERSION).tar.gz
# @ls -l *.gz
# @tar zvtf $(VERSION).tar.gz