-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.in
71 lines (55 loc) · 1.53 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
VERSION = 0.1
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
bindir = @bindir@
includedir = @includedir@
VPATH = @srcdir@
CC = @CC@
CPPFLAGS = -I. @CPPFLAGS@
CFLAGS = -I. @CFLAGS@
LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
DISTNAME = lzfx-$(VERSION)
DISTFILES = README LICENSE lzfx.c lzfx.h tests/*.test tests/test.c lzfx-util.c \
configure Makefile.in install-sh
TESTDIR = tests
TESTFILES = $(TESTDIR)/empty.test \
$(TESTDIR)/random.test
all: Makefile liblzfx.a util
clean:
-rm -f *.o *.a lzfx tests/test
lzfx.o: lzfx.c lzfx.h
$(CC) $(CFLAGS) lzfx.c -c
liblzfx.a: lzfx.o
rm -f $@
$(AR) rc $@ $^
$(RANLIB) $@
test: tests/test.c
$(CC) $(CFLAGS) $(TESTDIR)/test.c lzfx.c -llzf -o $(TESTDIR)/test
check: test
dd if=/dev/zero of=$(TESTDIR)/empty.test bs=1M count=4 > /dev/null 2>&1
dd if=/dev/urandom of=$(TESTDIR)/random.test bs=1M count=1 > /dev/null 2>&1
$(TESTDIR)/test $(TESTDIR)/*.test
-rm -f $(TESTFILES)
install: all
$(INSTALL) -d $(includedir)
$(INSTALL_DATA) lzfx.h $(includedir)
$(INSTALL) -d $(libdir)
$(INSTALL_DATA) liblzfx.a $(libdir)
$(INSTALL) -d $(bindir)
$(INSTALL) -m 755 lzfx $(bindir)
util: lzfx-util.c lzfx.c
$(CC) $(CFLAGS) lzfx-util.c lzfx.c -o lzfx
dist:
mkdir $(DISTNAME)
tar c $(DISTFILES) | tar xpC $(DISTNAME)
-chown -R root.root $(DISTNAME)
chmod -R u=rwX,go=rX $(DISTNAME)
tar cvf - $(DISTNAME) | gzip -9 > $(DISTNAME).tar.gz
rm -rf $(DISTNAME)
ls -l $(DISTNAME).tar.gz
Makefile: Makefile.in
./config.status