comparison libdlna-0.2.3/Makefile @ 129:4f6d9621ee00

add multi session streaming & add depending librarys. - libupnp-1.6.6 - libdlna-0.2.3
author Naoya OYAMA <naoya.oyama@gmail.com>
date Sun, 10 Oct 2010 15:33:18 +0900
parents
children
comparison
equal deleted inserted replaced
128:3a7d8d2f0585 129:4f6d9621ee00
1 ifeq (,$(wildcard config.mak))
2 $(error "config.mak is not present, run configure !")
3 endif
4 include config.mak
5
6 DISTFILE = libdlna-$(VERSION).tar.bz2
7 PKGCONFIG_DIR = $(libdir)/pkgconfig
8 PKGCONFIG_FILE = libdlna.pc
9
10 LIBTEST = test-libdlna
11 SRCS = test-libdlna.c
12
13 EXTRADIST = AUTHORS \
14 ChangeLog \
15 configure \
16 COPYING \
17 README \
18
19 SUBDIRS = src \
20
21 CFLAGS += -Isrc
22 LDFLAGS += -Lsrc -ldlna
23
24 ifeq ($(BUILD_STATIC),yes)
25 LDFLAGS += $(EXTRALIBS)
26 endif
27
28 all: lib test
29
30 lib:
31 $(MAKE) -C src
32
33 test: $(LIBTEST)
34
35 $(LIBTEST): $(SRCS)
36 $(CC) $? $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
37
38 clean:
39 $(MAKE) -C src clean
40 -$(RM) -f $(LIBTEST)
41 -$(RM) -f BUILD/*
42 -$(RM) -f INCLUDE/*
43
44 distclean: clean
45 -$(RM) -f config.log
46 -$(RM) -f config.mak
47 -$(RM) -f $(PKGCONFIG_FILE)
48
49 install: install-pkgconfig
50 $(MAKE) -C src install
51
52 install-pkgconfig: $(PKGCONFIG_FILE)
53 $(INSTALL) -d "$(PKGCONFIG_DIR)"
54 $(INSTALL) -m 644 $< "$(PKGCONFIG_DIR)"
55
56 .PHONY: clean distclean
57 .PHONY: install install-pkgconfig
58
59 dist:
60 -$(RM) $(DISTFILE)
61 dist=$(shell pwd)/libdlna-$(VERSION) && \
62 for subdir in . $(SUBDIRS); do \
63 mkdir -p "$$dist/$$subdir"; \
64 $(MAKE) -C $$subdir dist-all DIST="$$dist/$$subdir"; \
65 done && \
66 tar cjf $(DISTFILE) libdlna-$(VERSION)
67 -$(RM) -rf libdlna-$(VERSION)
68
69 dist-all:
70 cp $(EXTRADIST) $(SRCS) Makefile $(DIST)
71
72 .PHONY: dist dist-all