annotate src/Makefile @ 185:7a0f498af035 default tip

Fix a race condition.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Wed, 14 May 2014 22:43:57 +0900
parents 27e5f99f8991
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
1 ifeq (,$(wildcard ../config.mak))
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
2 $(error "../config.mak is not present, run configure !")
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
3 endif
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
4 include ../config.mak
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
5
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
6 PROG = recpt1
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
7 PROG2 = checksignal
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
8 PROG3 = pt1_lnbd
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
9 PROG4 = recpt1ctl
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
10
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
11 EXTRADIST = ushare.1 \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
12 cds.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
13 cms.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
14 msr.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
15 http.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
16 presentation.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
17 metadata.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
18 mime.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
19 services.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
20 buffer.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
21 util_iconv.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
22 content.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
23 cfgparser.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
24 trace.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
25 redblack.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
26 osdep.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
27 ctrl_telnet.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
28 ushare.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
29 gettext.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
30 minmax.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
31 decoder.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
32 mkpath.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
33 pt1_dev.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
34 recpt1.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
35 tssplitter_lite.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
36 upnp_device.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
37 upnp_main.h \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
38 version.h \
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
39 pt1_common.h \
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
40
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
41 SRCS = \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
42 cds.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
43 cms.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
44 msr.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
45 http.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
46 presentation.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
47 metadata.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
48 mime.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
49 services.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
50 buffer.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
51 util_iconv.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
52 content.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
53 cfgparser.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
54 trace.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
55 redblack.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
56 osdep.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
57 ctrl_telnet.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
58 ushare.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
59 decoder.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
60 mkpath.c \
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
61 recpt1.c \
168
061ef2cd98f0 Code refactoring.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 164
diff changeset
62 tssplitter_lite.c \
061ef2cd98f0 Code refactoring.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 164
diff changeset
63 pt1_common.c
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
64
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
65 SRCS2 = \
168
061ef2cd98f0 Code refactoring.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 164
diff changeset
66 checksignal.c \
061ef2cd98f0 Code refactoring.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 164
diff changeset
67 pt1_common.c
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
68
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
69 SRCS3 = \
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
70 pt1_lnbd.c
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
71
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
72 SRCS4 = \
168
061ef2cd98f0 Code refactoring.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 164
diff changeset
73 recpt1ctl.c \
061ef2cd98f0 Code refactoring.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 164
diff changeset
74 pt1_common.c
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
75
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
76 LIBS2 = -lpthread -lm
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
77
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
78 OBJS = $(SRCS:.c=.o)
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
79 OBJS2 = $(SRCS2:.c=.o)
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
80 OBJS3 = $(SRCS3:.c=.o)
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
81 OBJS4 = $(SRCS4:.c=.o)
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
82
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
83 .SUFFIXES: .c .o
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
84
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
85 all: depend $(PROG) $(PROG2) $(PROG3) $(PROG4)
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
86
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
87 .c.o:
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
88 $(CC) -c $(CFLAGS) -g $(OPTFLAGS) -o $@ $<
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
89
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
90 $(PROG): $(OBJS)
183
27e5f99f8991 Delete ES out function. Merge Yazawa's tssplitter_lite. Add liner option.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 173
diff changeset
91 $(CC) $(OBJS) $(LDFLAGS) -lpthread -lupnp -lixml -ldlna $(EXTRALIBS) -o $@
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
92
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
93 $(PROG2): $(OBJS2)
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
94 $(CC) $(OBJS2) $(LDFLAGS) $(EXTRALIBS) $(LIBS2) -o $@
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
95
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
96 $(PROG3): $(OBJS3)
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
97 $(CC) $(OBJS3) $(LDFLAGS) $(EXTRALIBS) -o $@
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
98
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
99 $(PROG4): $(OBJS4)
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
100 $(CC) $(OBJS3) $(LDFLAGS) $(EXTRALIBS) -o $@
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
101
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
102 clean:
173
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
103 -$(RM) -f *.o $(PROG) $(PROG2) $(PROG3) $(PROG4) version.h
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
104 -$(RM) -f .depend
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
105
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
106 distclean:
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
107
173
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
108 version.h:
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
109 revh=`hg parents --template 'const char *version = "r{rev}:{node|short} ({date|shortdate})";\n' 2>/dev/null`; \
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
110 if [ -n "$$revh" ] ; then \
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
111 echo "$$revh" > $@; \
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
112 else \
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
113 echo "const char *version = \"$(RELEASE_VERSION)\";" > $@; \
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
114 fi
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
115
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
116 install: $(PROG) $(PROG2) $(PROG3) $(PROG4)
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
117 $(INSTALL) -d $(bindir)
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
118 $(INSTALL) $(PROG) $(bindir)
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
119 $(INSTALL) $(PROG2) $(bindir)
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
120 $(INSTALL) $(PROG3) $(bindir)
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
121 $(INSTALL) $(PROG4) $(bindir)
150
036ae90f1b01 EXPERIMENTAL: Add channel scan script.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 145
diff changeset
122 $(INSTALL) channelscan_pt1.sh $(bindir)
036ae90f1b01 EXPERIMENTAL: Add channel scan script.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 145
diff changeset
123 $(INSTALL) epgdump_xml_parse.pl $(bindir)
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
124 $(STRIP) $(INSTALLSTRIP) $(bindir)/$(PROG)
145
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
125 $(STRIP) $(INSTALLSTRIP) $(bindir)/$(PROG2)
4e39ce051c57 Able to compile the checksignal.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 125
diff changeset
126 $(STRIP) $(INSTALLSTRIP) $(bindir)/$(PROG3)
164
7d8a5bb874ad EXPERIMENTAL: Change phisical channel by mq_recv().
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 150
diff changeset
127 $(STRIP) $(INSTALLSTRIP) $(bindir)/$(PROG4)
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
128
173
03ab3ade9fe5 modify display version.
Naoya OYAMA <naoya.oyama@gmail.com>
parents: 168
diff changeset
129 depend: version.h
125
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
130 $(CC) -I.. -MM $(CFLAGS) $(SRCS) 1>.depend
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
131
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
132 .PHONY: clean distclean install depend
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
133
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
134 dist-all:
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
135 cp $(EXTRADIST) $(SRCS) Makefile $(DIST)
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
136
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
137 .PHONY: dist-all
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
138
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
139 #
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
140 # include dependency files if they exist
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
141 #
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
142 ifneq ($(wildcard .depend),)
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
143 include .depend
e413158cae13 Add ushare project files.
naoyan@johnstown.minaminoshima.org
parents:
diff changeset
144 endif