-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile.def
61 lines (48 loc) · 1.83 KB
/
Makefile.def
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
# Makefile generated by build.
# C compiler
#CC=cc
# Install prefix
DESTDIR=
# Base install directory
PREFIX=/usr/local
# Install directory for binaries
BINDIR=$(PREFIX)/bin
# Install directory for manual
MANDIR=$(PREFIX)/share/man/man1
# compiler options:
# options is a collection of:
#
# -DAMIGA=1 Amiga support.
# -DLSTAT=1 Use lstat for finding symlinks.
# -DUTIME_H=1 Use utime.h
# -DUSERMEM=<size> Available memory for compress (default 800k).
# -DIBUFSIZ=<size> Input buffer size (default BUFSIZ).
# -DOBUFSIZ=<size> Output buffer size (default BUFSIZ)
#
options= $(CFLAGS) $(CPPFLAGS) -DUSERMEM=800000
# library options
LBOPT= $(LDFLAGS)
compress: Makefile compress.c patchlevel.h
$(CC) -o compress $(options) compress.c $(LBOPT)
install_core: compress
[ -f $(DESTDIR)$(BINDIR)/compress ] && \
{ rm -f $(DESTDIR)$(BINDIR)/compress.old ; \
mv $(DESTDIR)$(BINDIR)/compress $(DESTDIR)$(BINDIR)/compress.old ; } || :
rm -f $(DESTDIR)$(BINDIR)/uncompress $(DESTDIR)$(BINDIR)/zcat
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)
cp compress $(DESTDIR)$(BINDIR)/compress
rm -f $(DESTDIR)$(BINDIR)/uncompress
ln $(DESTDIR)$(BINDIR)/compress $(DESTDIR)$(BINDIR)/uncompress
cp compress.1 uncompress.1 $(DESTDIR)$(MANDIR)/.
chmod 0644 $(DESTDIR)$(MANDIR)/compress.1 $(DESTDIR)$(MANDIR)/uncompress.1
install_extra: install_core
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)
rm -f $(DESTDIR)$(BINDIR)/zcat
ln -f $(DESTDIR)$(BINDIR)/compress $(DESTDIR)$(BINDIR)/zcat
cp zcmp zdiff zmore $(DESTDIR)$(BINDIR)/.
chmod 0755 $(DESTDIR)$(BINDIR)/compress $(DESTDIR)$(BINDIR)/zcmp $(DESTDIR)$(BINDIR)/zdiff $(DESTDIR)$(BINDIR)/zmore
cp zcmp.1 zmore.1 $(DESTDIR)$(MANDIR)/.
chmod 0644 $(DESTDIR)$(MANDIR)/zcmp.1 $(DESTDIR)$(MANDIR)/zmore.1
install: install_extra
cleanup:
rm -f compress compress.def comp.log