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