-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.in
executable file
·233 lines (187 loc) · 8.23 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# Makefile.in
abs_top_srcdir = @abs_top_srcdir@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
fake_prefix = @fake_prefix@
installdir = $(prefix)/$(wireddir)
objdir = @objdir@
rundir = @rundir@
mandir = @mandir@
prefix = @prefix@
wireddir = @wireddir@
WD_VERSION = @WD_VERSION@
WD_MAINTAINER = @WD_MAINTAINER@
WD_USER = @WD_USER@
WD_GROUP = @WD_GROUP@
DISTFILES = INSTALL LICENSE NEWS README Makefile Makefile.in \
config.guess config.status config.h.in config.sub configure \
configure.in install-sh libwired man run thirdparty wired
SUBDIRS = libwired
WIREDOBJS = $(addprefix $(objdir)/wired/,$(notdir $(patsubst %.c,%.o,$(shell find $(abs_top_srcdir)/wired -name "[a-z]*.c"))))
NATPMPOBJS = $(addprefix $(objdir)/natpmp/,$(notdir $(patsubst %.c,%.o,$(shell find $(abs_top_srcdir)/thirdparty/natpmp -name "[a-z]*.c"))))
MINIUPNPCOBJS = $(addprefix $(objdir)/miniupnpc/,$(notdir $(patsubst %.c,%.o,$(shell find $(abs_top_srcdir)/thirdparty/miniupnpc -name "[a-z]*.c"))))
TRANSFERTESTOBJS = $(addprefix $(objdir)/transfertest/,$(notdir $(patsubst %.c,%.o,$(shell find $(abs_top_srcdir)/test/transfertest -name "[a-z]*.c"))))
DEFS = @DEFS@ -DENABLE_STRNATPMPERR -DMINIUPNPC_SET_SOCKET_TIMEOUT
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = -L$(rundir)/libwired/lib @LDFLAGS@
LIBS = -lwired @LIBS@
INCLUDES = -I$(abs_top_srcdir) -I$(rundir)/libwired/include -I$(abs_top_srcdir)/thirdparty
INSTALL = @INSTALL@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
PREPROCESS = $(CC) -E $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPEND = $(CC) -MM $(INCLUDES)
LINK = $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
ARCHIVE = ar rcs $@
.PHONY: all all-recursive clean-recursive distclean-recursive install install-only install-wired install-man dist clean distclean scmclean
.NOTPARALLEL:
all: all-recursive $(rundir)/wired $(rundir)/wiredctl $(rundir)/etc/wired.conf
ifeq ($(WD_MAINTAINER), 1)
all: Makefile configure config.h.in $(rundir)/transfertest
Makefile: Makefile.in config.status
./config.status
configure: configure.in
autoconf
config.h.in: configure.in
autoheader
touch $@
rm -f $@~
endif
all-recursive clean-recursive distclean-recursive:
@list='$(SUBDIRS)'; \
for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
(cd $$subdir && $(MAKE) -e $$target) || exit 1; \
done
$(rundir)/wired: $(WIREDOBJS) $(NATPMPOBJS) $(MINIUPNPCOBJS) $(rundir)/libwired/lib/libwired.a
@test -d $(@D) || mkdir -p $(@D)
$(LINK) $(WIREDOBJS) $(NATPMPOBJS) $(MINIUPNPCOBJS) $(LIBS)
$(rundir)/wiredctl: $(abs_top_srcdir)/wired/wiredctl.in
@test -d $(@D) || mkdir -p $(@D)
sed -e 's,@wireddir\@,$(fake_prefix)/$(wireddir),g' $< > $@
chmod +x $@
$(rundir)/etc/wired.conf: $(abs_top_srcdir)/wired/wired.conf.in
@test -d $(@D) || mkdir -p $(@D)
sed -e 's,@WD_USER\@,$(WD_USER),g' -e 's,@WD_GROUP\@,$(WD_GROUP),g' $< > $@
$(rundir)/transfertest: $(TRANSFERTESTOBJS) $(rundir)/libwired/lib/libwired.a
@test -d $(@D) || mkdir -p $(@D)
$(LINK) $(TRANSFERTESTOBJS) $(LIBS)
$(objdir)/wired/%.o: $(abs_top_srcdir)/wired/%.c
@test -d $(@D) || mkdir -p $(@D)
$(COMPILE) -I$(<D) -c $< -o $@
$(objdir)/wired/%.d: $(abs_top_srcdir)/wired/%.c
@test -d $(@D) || mkdir -p $(@D)
($(DEPEND) $< | sed 's,$*.o,$(@D)/&,g'; echo "$@: $<") > $@
$(objdir)/natpmp/%.o: $(abs_top_srcdir)/thirdparty/natpmp/%.c
@test -d $(@D) || mkdir -p $(@D)
$(COMPILE) -I$(<D) -c $< -o $@
$(objdir)/natpmp/%.d: $(abs_top_srcdir)/thirdparty/natpmp/%.c
@test -d $(@D) || mkdir -p $(@D)
($(DEPEND) $< | sed 's,$*.o,$(@D)/&,g'; echo "$@: $<") > $@
$(objdir)/miniupnpc/%.o: $(abs_top_srcdir)/thirdparty/miniupnpc/%.c
@test -d $(@D) || mkdir -p $(@D)
$(COMPILE) -I$(<D) -c $< -o $@
$(objdir)/miniupnpc/%.d: $(abs_top_srcdir)/thirdparty/miniupnpc/%.c
@test -d $(@D) || mkdir -p $(@D)
($(DEPEND) $< | sed 's,$*.o,$(@D)/&,g'; echo "$@: $<") > $@
$(objdir)/transfertest/%.o: $(abs_top_srcdir)/test/transfertest/%.c
@test -d $(@D) || mkdir -p $(@D)
$(COMPILE) -I$(<D) -c $< -o $@
$(objdir)/transfertest/%.d: $(abs_top_srcdir)/test/transfertest/%.c
@test -d $(@D) || mkdir -p $(@D)
($(DEPEND) $< | sed 's,$*.o,$(@D)/&,g'; echo "$@: $<") > $@
install: all install-man install-wired
install-only: install-man install-wired
install-wired:
@if [ -e $(installdir)/wired ]; then \
touch .update; \
fi
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/etc/
if [ ! -f $(installdir)/etc/wired.conf ]; then \
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/; \
fi
if [ ! -d $(installdir)/files ]; then \
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/files/; \
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/files/Uploads/; \
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/files/Uploads/.wired/; \
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/files/Uploads/.wired/type $(installdir)/files/Uploads/.wired/; \
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/files/Drop\ Box/; \
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/files/Drop\ Box/.wired/; \
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/files/Drop\ Box/.wired/type $(installdir)/files/Drop\ Box/.wired/; \
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/files/Drop\ Box/.wired/permissions $(installdir)/files/Drop\ Box/.wired/; \
fi
if [ ! -f $(installdir)/banner.png ]; then \
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/banner.png $(installdir)/; \
fi
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wired.xml $(installdir)/
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wired $(installdir)/
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wiredctl $(installdir)/
@if [ -f .update ]; then \
echo ""; \
echo "Update complete!"; \
echo ""; \
echo "You should now run:"; \
echo " $(installdir)/wiredctl restart"; \
echo "to restart a running server."; \
else \
echo ""; \
echo "Installation complete!"; \
echo ""; \
echo "An administrator account with login \"admin\" and no password has been created."; \
echo ""; \
echo "Remember to edit $(installdir)/etc/wired.conf if you want to make any changes before starting the server."; \
echo ""; \
echo "When you are done, run:"; \
echo " $(installdir)/wiredctl start"; \
echo "to start the server."; \
fi
@rm -f .update
install-man:
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(mandir)/
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(mandir)/man1/
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(abs_top_srcdir)/man/wiredctl.1 $(mandir)/man1/
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(mandir)/man5/
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(abs_top_srcdir)/man/wired.conf.5 $(mandir)/man5/
$(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(mandir)/man8/
$(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(abs_top_srcdir)/man/wired.8 $(mandir)/man8/
dist:
rm -rf wired-$(WD_VERSION)
rm -f wired-$(WD_VERSION).tar.gz
mkdir wired-$(WD_VERSION)
@for i in $(DISTFILES); do \
if [ -e $$i ]; then \
echo cp -LRp $$i wired-$(WD_VERSION)/$$i; \
cp -LRp $$i wired-$(WD_VERSION)/$$i; \
fi \
done
$(SHELL) -ec "cd wired-$(WD_VERSION) && WD_MAINTAINER=0 WI_MAINTAINER=0 $(MAKE) -e distclean scmclean"
tar -czf wired-$(WD_VERSION).tar.gz wired-$(WD_VERSION)
rm -rf wired-$(WD_VERSION)
clean: clean-recursive
rm -f $(objdir)/wired/*.o
rm -f $(objdir)/wired/*.d
rm -f $(objdir)/transfertest/*.o
rm -f $(objdir)/transfertest/*.d
rm -f $(objdir)/natpmp/*.o
rm -f $(objdir)/natpmp/*.d
rm -f $(objdir)/miniupnpc/*.o
rm -f $(objdir)/miniupnpc/*.d
rm -f $(rundir)/wired
rm -f $(rundir)/wiredctl
rm -f $(rundir)/etc/wired.conf
distclean: clean distclean-recursive
rm -rf $(objdir)
rm -f Makefile config.h config.log config.status config.cache
rm -f wired-$(WD_VERSION).tar.gz
scmclean:
find . -name .DS_Store -print0 | xargs -0 rm -f
find . -name CVS -print0 | xargs -0 rm -rf
find . -name .svn -print0 | xargs -0 rm -rf
ifeq ($(WD_MAINTAINER), 1)
-include $(WIREDOBJS:.o=.d)
-include $(NATPMPOBJS:.o=.d)
-include $(MINIUPNPSOBJS:.o=.d)
-include $(TRANSFERTESTOBJS:.o=.d)
endif