-
Notifications
You must be signed in to change notification settings - Fork 5
/
makefile.mak
245 lines (188 loc) · 8.9 KB
/
makefile.mak
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
234
235
236
237
238
239
240
241
242
243
244
245
#
# UFTP - UDP based FTP with multicast
#
# Copyright (C) 2001-2013 Dennis A. Bush, Jr. [email protected]
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Additional permission under GNU GPL version 3 section 7
#
# If you modify this program, or any covered work, by linking or
# combining it with the OpenSSL project's OpenSSL library (or a
# modified version of that library), containing parts covered by the
# terms of the OpenSSL or SSLeay licenses, the copyright holder
# grants you additional permission to convey the resulting work.
# Corresponding Source for a non-source form of such a combination
# shall include the source code for the parts of OpenSSL used as well
# as that of the covered work.
#
CFLAGS=-Zi -W3 -nologo -Od /D WINDOWS
!IFDEF NO_ENCRYPTION
CFLAGS=$(CFLAGS) /D NO_ENCRYPTION
LDLIBS = ws2_32.lib iphlpapi.lib
!ELSE IFDEF OPENSSL
CFLAGS=$(CFLAGS) /D OPENSSL /MD
LDLIBS = libeay32.lib ssleay32.lib ws2_32.lib iphlpapi.lib
INCLUDE = $(INCLUDE);C:\OpenSSL\include
LIB = $(LIB);C:\OpenSSL\lib
!ELSE IFDEF WINXP
LDLIBS = advapi32.lib ws2_32.lib iphlpapi.lib
!ELSE
LDLIBS = bcrypt.lib ncrypt.lib ws2_32.lib iphlpapi.lib
!ENDIF
!IFDEF WINXP
CFLAGS=$(CFLAGS) /D _WIN32_WINNT=_WIN32_WINNT_WINXP
!ELSE
CFLAGS=$(CFLAGS) /D _WIN32_WINNT=_WIN32_WINNT_WIN7
!ENDIF
LDFLAGS=-debug -nologo -subsystem:console
CC = cl
LINK = link
all: uftp.exe uftpd.exe uftpproxyd.exe uftp_keymgt.exe
clean:
-del /f uftp.exe uftpd.exe uftpproxyd.exe uftp_keymgt.exe *.obj *.pdb *.ilk
test: testclient_multi.exe
testclient_multi.obj: testclient_multi.c uftp.h uftp_common.h encryption.h
!IFDEF OPENSSL
testclient_multi.exe: testclient_multi.obj encrypt_openssl.obj uftp_common.obj win_func.obj
$(LINK) $(LDFLAGS) -out:$@ $** $(LDLIBS)
!ELSE
testclient_multi.exe: testclient_multi.obj encrypt_cryptoapi.obj uftp_common.obj win_func.obj
$(LINK) $(LDFLAGS) -out:$@ $** $(LDLIBS)
!ENDIF
client_announce.obj: client_announce.c client.h uftp_common.h uftp.h \
encryption.h client_common.h client_announce.h
client_common.obj: client_common.c client.h uftp_common.h uftp.h \
encryption.h client_common.h
client_config.obj: client_config.c client.h uftp_common.h uftp.h \
encryption.h client_config.h
client_fileinfo.obj: client_fileinfo.c client.h uftp_common.h uftp.h \
encryption.h client_common.h client_fileinfo.h client_transfer.h
client_init.obj: client_init.c client.h uftp_common.h uftp.h encryption.h \
client_init.h client_config.h client_common.h
client_loop.obj: client_loop.c client.h uftp_common.h uftp.h encryption.h \
client_common.h client_loop.h client_announce.h client_fileinfo.h \
client_transfer.h heartbeat_send.h
client_main.obj: client_main.c client_config.h client_init.h client_loop.h
client_transfer.obj: client_transfer.c client.h uftp_common.h uftp.h \
encryption.h client_common.h client_transfer.h
server_announce.obj: server_announce.c server.h uftp_common.h uftp.h \
encryption.h server_common.h server_announce.h
server_common.obj: server_common.c server.h uftp_common.h uftp.h \
encryption.h server_common.h
server_config.obj: server_config.c server.h uftp_common.h uftp.h \
encryption.h server_config.h
server_init.obj: server_init.c server.h uftp_common.h uftp.h encryption.h \
server_config.h server_init.h
server_main.obj: server_main.c server_config.h server_init.h server_send.h
server_phase.obj: server_phase.c server.h uftp_common.h uftp.h encryption.h \
server_config.h server_common.h server_announce.h server_transfer.h
server_send.obj: server_send.c server.h uftp_common.h uftp.h encryption.h \
server_send.h server_phase.h server_common.h
server_transfer.obj: server_transfer.c server.h uftp_common.h uftp.h \
encryption.h server_common.h server_transfer.h
proxy_common.obj: proxy_common.c proxy.h uftp_common.h uftp.h encryption.h \
proxy_common.h proxy_upstream.h
proxy_config.obj: proxy_config.c proxy.h uftp_common.h uftp.h encryption.h \
proxy_config.h
proxy_downstream.obj: proxy_downstream.c proxy.h uftp_common.h uftp.h \
encryption.h proxy_common.h proxy_downstream.h
proxy_init.obj: proxy_init.c proxy.h uftp_common.h uftp.h encryption.h \
proxy_init.h proxy_config.h proxy_common.h
proxy_loop.obj: proxy_loop.c proxy.h uftp_common.h uftp.h encryption.h \
proxy_common.h proxy_loop.h proxy_upstream.h proxy_downstream.h \
heartbeat_send.h
proxy_main.obj: proxy_main.c proxy_config.h proxy_init.h proxy_loop.h
proxy_upstream.obj: proxy_upstream.c proxy.h uftp_common.h uftp.h \
encryption.h proxy_common.h proxy_upstream.h proxy_downstream.h
uftp_keymgt.obj: uftp_keymgt.c uftp_common.h uftp.h encryption.h
encrypt_cng.obj: encrypt_cng.c uftp_common.h uftp.h encryption.h
encrypt_cryptoapi.obj: encrypt_cryptoapi.c uftp_common.h uftp.h encryption.h
encrypt_openssl.obj: encrypt_openssl.c uftp_common.h uftp.h encryption.h
uftp_common.obj: uftp_common.c uftp.h uftp_common.h encryption.h
heartbeat_send.obj: heartbeat_send.c uftp_common.h uftp.h encryption.h \
heartbeat_send.h
win_func.obj: win_func.c win_func.h
!IFDEF NO_ENCRYPTION
UFTP_OBJS=win_func.obj uftp_common.obj encrypt_none.obj \
server_announce.obj server_transfer.obj \
server_send.obj server_phase.obj \
server_common.obj server_config.obj server_init.obj server_main.obj
UFTPD_OBJS=win_func.obj uftp_common.obj encrypt_none.obj client_loop.obj \
client_announce.obj client_fileinfo.obj client_transfer.obj \
client_common.obj client_config.obj client_init.obj client_main.obj \
heartbeat_send.obj
UFTPPROXYD_OBJS=win_func.obj uftp_common.obj encrypt_none.obj \
proxy_loop.obj proxy_upstream.obj proxy_downstream.obj \
proxy_common.obj proxy_config.obj proxy_init.obj proxy_main.obj \
heartbeat_send.obj
UFTP_KEYMGT_OBJS=uftp_keymgt.obj win_func.obj uftp_common.obj encrypt_none.obj
!ELSE IFDEF OPENSSL
UFTP_OBJS=win_func.obj uftp_common.obj encrypt_openssl.obj \
server_announce.obj server_transfer.obj \
server_send.obj server_phase.obj \
server_common.obj server_config.obj server_init.obj server_main.obj
UFTPD_OBJS=win_func.obj uftp_common.obj encrypt_openssl.obj client_loop.obj \
client_announce.obj client_fileinfo.obj client_transfer.obj \
client_common.obj client_config.obj client_init.obj client_main.obj \
heartbeat_send.obj
UFTPPROXYD_OBJS=win_func.obj uftp_common.obj encrypt_openssl.obj \
proxy_loop.obj proxy_upstream.obj proxy_downstream.obj \
proxy_common.obj proxy_config.obj proxy_init.obj proxy_main.obj \
heartbeat_send.obj
UFTP_KEYMGT_OBJS=uftp_keymgt.obj win_func.obj uftp_common.obj encrypt_openssl.obj
!ELSE IFDEF WINXP
UFTP_OBJS=win_func.obj uftp_common.obj encrypt_cryptoapi.obj \
server_announce.obj server_transfer.obj \
server_send.obj server_phase.obj \
server_common.obj server_config.obj server_init.obj server_main.obj \
UFTPD_OBJS=win_func.obj uftp_common.obj encrypt_cryptoapi.obj client_loop.obj \
client_announce.obj client_fileinfo.obj client_transfer.obj \
client_common.obj client_config.obj client_init.obj client_main.obj \
heartbeat_send.obj
UFTPPROXYD_OBJS=win_func.obj uftp_common.obj encrypt_cryptoapi.obj \
proxy_loop.obj proxy_upstream.obj proxy_downstream.obj \
proxy_common.obj proxy_config.obj proxy_init.obj proxy_main.obj \
heartbeat_send.obj
UFTP_KEYMGT_OBJS=uftp_keymgt.obj win_func.obj uftp_common.obj encrypt_cryptoapi.obj
!ELSE
UFTP_OBJS=win_func.obj uftp_common.obj encrypt_cng.obj \
server_announce.obj server_transfer.obj \
server_send.obj server_phase.obj \
server_common.obj server_config.obj server_init.obj server_main.obj \
UFTPD_OBJS=win_func.obj uftp_common.obj encrypt_cng.obj client_loop.obj \
client_announce.obj client_fileinfo.obj client_transfer.obj \
client_common.obj client_config.obj client_init.obj client_main.obj \
heartbeat_send.obj
UFTPPROXYD_OBJS=win_func.obj uftp_common.obj encrypt_cng.obj \
proxy_loop.obj proxy_upstream.obj proxy_downstream.obj \
proxy_common.obj proxy_config.obj proxy_init.obj proxy_main.obj \
heartbeat_send.obj
UFTP_KEYMGT_OBJS=uftp_keymgt.obj win_func.obj uftp_common.obj encrypt_cng.obj
!ENDIF
uftp.exe: $(UFTP_OBJS)
$(LINK) $(LDFLAGS) -out:$@ $** $(LDLIBS)
uftpd.exe: $(UFTPD_OBJS)
$(LINK) $(LDFLAGS) -out:$@ $** $(LDLIBS)
uftpproxyd.exe: $(UFTPPROXYD_OBJS)
$(LINK) $(LDFLAGS) -out:$@ $** $(LDLIBS)
uftp_keymgt.exe: $(UFTP_KEYMGT_OBJS)
$(LINK) $(LDFLAGS) -out:$@ $** $(LDLIBS)
.c.obj:
$(CC) -c $(CFLAGS) $<
uftp: uftp.exe
uftpd: uftpd.exe
uftpproxyd: uftpproxyd.exe
uftp_keymgt: uftp_keymgt.exe
testclient_multi: testclient_multi.exe