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
|
TARS= client.cxx server.cxx stun.cxx stun.h tlsServer.cxx udp.cxx udp.h \
Makefile rfc3489.txt\
client.sln client.vcproj server.sln server.vcproj Stun.sln \
id.pem id_key.pem root.pem \
nattestwarning.txt nattest wnattest.bat \
WinStun/resource.h WinStun/stdafx.cpp WinStun/stdafx.h \
WinStun/WinStun.cpp WinStun/WinStunDlg.cpp WinStun/WinStunDlg.h WinStun/WinStun.h \
WinStun/WinStun.rc WinStun/WinStun.vcproj \
WinStun/res/WinStun.ico WinStun/res/WinStun.manifest WinStun/res/WinStun.rc2 \
WinStunSetup/WinStunSetup.vdproj
# if you chnage this version, change in stun.h too
VERSION=0.96
#CXXFLAGS+=-O2
#LDFLAGS+=-O2 -lssl
STUNLIB=libstun.a
#
# Alternatively, for debugging.
#
CXXFLAGS+=-g -O -Wall
LDFLAGS+=-g -O -Wall
# for solaris
#LDFLAGS+= -lnsl -lsocket
all: server client
clean:
- rm *.o server client tlsServer
tar: $(TARS)
cd ..; tar cvfz `date +"stund/stund_$(VERSION)_$(PROG)%b%d.tgz"` \
$(addprefix stund/, $(TARS))
server: server.o stun.o udp.o
$(CXX) $(LDFLAGS) -o $@ $^
tlsServer: tlsServer.o stun.o udp.o
$(CXX) $(LDFLAGS) -o $@ $^
client: client.o stun.o udp.o
$(CXX) $(LDFLAGS) -o $@ $^
%.o:%.cxx
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
libstun.a: stun.o udp.o
ar rv $@ $<
%:RCS/%
co $@
# Dependancies
server.o: stun.h udp.h
client.o: stun.h udp.h
stun.o: stun.h udp.h
udp.o: stun.h udp.h
tlsServer.o: stun.h udp.h
|