Debian Codegraph @

libflake/Makefile

raw
1 #
2 # Flake Library Makefile
3 #
4 include ../config.mak
5
6 CFLAGS=$(OPTFLAGS) -I. -I.. -I$(SRC_PATH)/libflake \
7 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE \
8 -DHAVE_CONFIG_H
9
10 OBJS= crc.o encode.o lpc.o md5.o optimize.o rice.o vbs.o \
11
12
13 HEADERS = flake.h
14
15 NAME=flake
16
17 SRC_DIR = $(SRC_PATH)/lib$(NAME)
18 VPATH = $(SRC_DIR)
19
20 SRCS := $(OBJS:.o=.c)
21
22 all: $(EXTRADEPS) $(LIB)
23
24 $(LIB): $(OBJS)
25 rm -f $@
26 $(AR) rc $@ $^ $(EXTRAOBJS)
27 $(RANLIB) $@
28
29 %.o: %.c
30 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
31
32 depend: $(SRCS)
33 $(CC) -MM $(CFLAGS) $^ 1>.depend
34
35 dep: depend
36
37 clean:
38 rm -f *.o *.d *~ *.a *.lib *.def *.exp
39
40 distclean: clean
41 rm -f .depend
42
43 install: install-libs install-headers
44
45 install-libs: $(LIB)
46 install -d "$(libdir)"
47 install -m 644 $(LIB) "$(libdir)"
48 $(LIB_INSTALL_EXTRA_CMD)
49
50 install-headers:
51 install -d "$(incdir)"
52 install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(incdir)"
53
54 uninstall: uninstall-libs uninstall-headers
55
56 uninstall-libs:
57 -rm -f "$(libdir)/$(LIB)"
58
59 uninstall-headers:
60 rm -f "$(addprefix $(incdir)/,$(HEADERS))"
61
62 ../config.mak:
63 touch ../config.mak
64
65 #
66 # include dependency files if they exist
67 #
68 ifneq ($(wildcard .depend),)
69 include .depend
70 endif