summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 3c87d62de8b257216a30f8b2a9ae2661c2a47141 (plain)
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
VERSION = 3.6

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
bindir = @bindir@
includedir = @includedir@

VPATH = @srcdir@

CC = @CC@
CPPFLAGS = -I. @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@

all: Makefile lzf

clean:
	-rm -f *.o *.a lzf bench

lzf_c.o: lzf_c.c lzfP.h

lzf_d.o: lzf_d.c lzfP.h

lzf.o: lzf.c

lzf: lzf.o liblzf.a

lzfP.h: lzf.h config.h

liblzf.a: lzf_c.o lzf_d.o
	rm -f $@
	$(AR) rc $@ $^
	$(RANLIB) $@

install: all
	$(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 lzf $(bindir)
	$(INSTALL) -d $(includedir)
	$(INSTALL_DATA) lzf.h $(includedir)
	$(INSTALL) -d $(libdir)
	$(INSTALL_DATA) liblzf.a $(libdir)

dist:
	mkdir liblzf-$(VERSION)
	tar c LICENSE README Makefile.in config.h.in \
              configure configure.ac install-sh \
	      cs/README cs/CLZF.cs \
              lzf.h lzfP.h lzf_c.c lzf_d.c \
              crc32.h lzf.c Changes \
              | tar xpC liblzf-$(VERSION)
	-chown -R root.root liblzf-$(VERSION)
	chmod -R u=rwX,go=rX liblzf-$(VERSION)
	tar cvf - liblzf-$(VERSION) | gzip -9 >liblzf-$(VERSION).tar.gz
	rm -rf liblzf-$(VERSION)
	ls -l liblzf-$(VERSION).tar.gz

Makefile: Makefile.in
	./config.status

bench: Makefile liblzf.a bench.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -g -o bench bench.c -L. -llzf