annotate libdlna-0.2.3/src/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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 ifeq ($(BUILD_STATIC),yes)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
7 BUILD_RULES += lib_static
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
8 INSTALL_RULES += install_static
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
9 endif
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
10 ifeq ($(BUILD_SHARED),yes)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
11 BUILD_RULES += lib_shared
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
12 INSTALL_RULES += install_shared
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
13 endif
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
14
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
15 LIBNAME = libdlna
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
16 LIBNAME_SHARED = ${LIBNAME}.so
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
17 LIBNAME_STATIC = ${LIBNAME}.a
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
18 LIBNAME_VERSION = $(LIBNAME_SHARED).$(VERSION)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
19 LIBNAME_MAJOR = $(LIBNAME_SHARED).$(shell echo $(VERSION) | cut -f1 -d.)
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 SRCS = profiles.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
22 containers.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
23 image_jpeg.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
24 image_png.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
25 audio_aac.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
26 audio_ac3.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
27 audio_amr.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
28 audio_atrac3.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
29 audio_g726.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
30 audio_lpcm.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
31 audio_mp2.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
32 audio_mp3.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
33 audio_wma.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
34 av_mpeg1.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
35 av_mpeg2.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
36 av_mpeg4_part2.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
37 av_mpeg4_part10.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
38 av_wmv9.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
39 upnp_dms.c \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
40
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
41 EXTRADIST = dlna.h \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
42 dlna_internals.h \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
43 containers.h \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
44 profiles.h \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
45
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
46 ifeq ($(DEBUG),yes)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
47 CFLAGS += -DHAVE_DEBUG
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
48 endif
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
49
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
50 OBJS = $(SRCS:.c=.o)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
51 LOBJS = $(SRCS:.c=.lo)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
52
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
53 .SUFFIXES: .c .o .lo
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
54
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
55 all: depend $(BUILD_RULES)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
56
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
57 .c.o:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
58 $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $<
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
59
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
60 .c.lo:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
61 $(CC) -c -fPIC $(CFLAGS) $(OPTFLAGS) -o $@ $<
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
62
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
63 lib_static_info_pre:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
64 @echo
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
65 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
66 @echo "# Building static objects #"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
67 @echo "#############################################"
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 lib_static_info_post:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
70 @echo
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
71 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
72 @echo "# Linking static objects #"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
73 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
74
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
75 lib_static: lib_static_info_pre $(OBJS) lib_static_info_post
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
76 $(AR) r $(LIBNAME_STATIC) $(OBJS)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
77 $(RANLIB) $(LIBNAME_STATIC)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
78
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
79 lib_shared_info_pre:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
80 @echo
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
81 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
82 @echo "# Building shared objects #"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
83 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
84
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
85 lib_shared_info_post:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
86 @echo
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
87 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
88 @echo "# Linking shared objects #"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
89 @echo "#############################################"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
90
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
91 lib_shared: lib_shared_info_pre $(LOBJS) lib_shared_info_post
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
92 $(CC) -shared -Wl,-soname,$(LIBNAME_MAJOR) $(LOBJS) \
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
93 $(LDFLAGS) $(EXTRALIBS) -o $(LIBNAME_VERSION)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
94 $(LN) -sf $(LIBNAME_VERSION) $(LIBNAME_MAJOR)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
95 $(LN) -sf $(LIBNAME_MAJOR) $(LIBNAME_SHARED)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
96
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
97 clean:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
98 -$(RM) -f *.o *.lo *.a *.so*
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
99 -$(RM) -f .depend
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
100
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
101 install_static: lib_static
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
102 $(INSTALL) -d $(libdir)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
103 $(INSTALL) $(LIBNAME_STATIC) $(libdir)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
104
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
105 install_shared: lib_shared
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
106 $(INSTALL) -d $(libdir)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
107 $(INSTALL) $(LIBNAME_VERSION) $(libdir)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
108 $(LN) -sf $(LIBNAME_VERSION) $(libdir)/$(LIBNAME_MAJOR)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
109 $(LN) -sf $(LIBNAME_MAJOR) $(libdir)/$(LIBNAME_SHARED)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
110
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
111 install: $(INSTALL_RULES)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
112 $(INSTALL) -d $(includedir)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
113 $(INSTALL) -m 644 dlna.h $(includedir)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
114
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
115 depend:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
116 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
117
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
118 .PHONY: clean depend
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
119
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
120 dist-all:
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
121 cp $(EXTRADIST) $(SRCS) Makefile $(DIST)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
122
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
123 .PHONY: dist-all
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
124
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
125 #
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
126 # include dependency files if they exist
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
127 #
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
128 ifneq ($(wildcard .depend),)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
129 include .depend
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
130 endif