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