switched from PracticalSocket to libasio
[anytun.git] / src / Sockets / Makefile
blob631501dbc3d708c2283490ebe36ae01b20a7712b
1 # platforms:
2 # linux-x86-32
3 # win32-cygwin
4 # solaris9-sparc-64
5 # macosx
6 # solaris8
7 PLATFORM = linux-x86-32
8 IPPROTO_IPV6 = yes
10 # .h files installed to $(PREFIX)/include/Sockets
11 # static lib .a files installed to $(PREFIX)/lib
12 PREFIX = /usr/local
14 # include paths
15 INCLUDE =
17 include Makefile.version
19 # CXX, CFLAGS, LIBS
20 include Makefile.Defines.$(PLATFORM)
22 # uncomment these lines if the library should be in its own namespace
23 CFLAGS += -DSOCKETS_NAMESPACE=sockets
24 CFLAGS += -DSOCKETS_NAMESPACE_STR='"sockets"'
26 # Enable insane amounts of debug output to stdout/stderr:
27 #CFLAGS += -D_DEBUG
28 #CFLAGS += -DIPPROTO_IPV6
31 CPPFLAGS = $(CFLAGS)
33 PROGS = Sockets-config
35 all: libSockets.a $(PROGS)
37 libSockets.a: $(OBJS)
38 ar cru $@ $(OBJS)
39 ranlib $@
41 Sockets-config: Sockets-config.o
42 $(CXX) -o $@ $^
44 clean:
45 rm -f *.o *~ slask *.d $(PROGS) *.a */*~
47 -include *.d
50 # everything which follows is www.alhem.net/Sockets website maintenance stuff, please ignore
51 HTDOCS = /usr/local/apache/www.alhem.net/htdocs
53 diff:
54 diff -b -B -C 3 /usr/src/Sockets-$(DIFF_VERSION) . | \
55 /usr/local/bin/d2html > \
56 $(HTDOCS)/Sockets/latest_diff.html
58 install: all
59 @mkdir -p $(PREFIX)/lib
60 cp libSockets.a $(PREFIX)/lib
61 @mkdir -p $(PREFIX)/include/Sockets
62 cp -a *.h $(PREFIX)/include/Sockets
63 @rm -f $(PREFIX)/include/Sockets/SSLSocket.*
64 @rm -f $(PREFIX)/include/Sockets/HttpsGetSocket.*
65 @rm -f $(PREFIX)/include/Sockets/HttpsSocket.*
66 @rm -f $(PREFIX)/include/Sockets/EventSocket.*
67 @rm -f $(PREFIX)/include/Sockets/PoolSocket.*
68 @rm -f $(PREFIX)/include/Sockets/SocketThread.*
69 @rm -f $(PREFIX)/include/Sockets/CircularBuffer.*
70 @rm -f $(PREFIX)/include/Sockets/*Crypt.h
71 @rm -f $(PREFIX)/include/Sockets/CTcpSocket.h
72 @rm -f $(PREFIX)/include/Sockets/Min*Socket.h
73 @rm -f $(PREFIX)/include/Sockets/Min*Handler.h
74 @rm -f $(PREFIX)/include/Sockets/Uid.h
75 @mkdir -p $(PREFIX)/bin
76 install Sockets-config $(PREFIX)/bin
78 # no binary files, zip will translate lf to cr lf
79 FILES = *.h *.cpp Makefile Makefile.* Project/*.ds* \
80 README.macosx gpl.txt mkdot.sh \
81 Project.net/Sockets/*.vcproj Project.net/Sockets/*.sln \
82 Project.net/Test/*.vcproj \
83 DevCpp/*.dev tests/Makefile tests/*.cpp \
84 OSX.zip
86 tar: clean
87 rm -f MinderSocket_T.h
88 rm -f uuid.h
89 rm -f Stdin.*
90 rm -f sockets_test.cpp
91 rm -f ListenSocketBase.*
92 rm -f CircularBuffer.*
93 rm -f ICrypt.* NullCrypt.* CTcpSocket.*
94 rm -f Min*Socket.* Min*Handler.*
95 rm -f Uid.*
96 tar czf Sockets-$(VERSION).tar.gz $(FILES)
97 /usr/local/bin/tarfix.sh Sockets-$(VERSION)
98 cp Sockets-$(VERSION).tar.gz $(HTDOCS)/Sockets
99 cp Sockets-$(VERSION).zip $(HTDOCS)/Sockets
100 cp tests/sockets_test.cpp /usr/local/apache/www.alhem.net/htdocs/Sockets/
101 # $(MAKE) -C ../SocketsLite tar
103 tmptar: clean
104 rm -f MinderSocket_T.h
105 rm -f uuid.h
106 rm -f Stdin.*
107 rm -f sockets_test.cpp
108 rm -f ListenSocketBase.*
109 rm -f CircularBuffer.*
110 rm -f ICrypt.* NullCrypt.* CTcpSocket.*
111 rm -f Min*Socket.* Min*Handler.*
112 rm -f Uid.*
113 tar czf Sockets-$(VERSION).tar.gz $(FILES)
114 /usr/local/bin/tarfix.sh Sockets-$(VERSION)
115 cp Sockets-$(VERSION).tar.gz $(HTDOCS)/Sockets-tmp
116 cp Sockets-$(VERSION).zip $(HTDOCS)/Sockets-tmp
117 cp tests/sockets_test.cpp /usr/local/apache/www.alhem.net/htdocs/Sockets-tmp
118 $(MAKE) -C ../SocketsLite tmptar
120 docs: clean
121 doxygen dox2.cfg
122 rm -f MinderSocket_T.h
123 rm -f uuid.h
124 rm -f Stdin.*
125 rm -f sockets_test.cpp
126 rm -f ListenSocketBase.*
127 rm -f CircularBuffer.*
128 rm -f ICrypt.* NullCrypt.* CTcpSocket.*
129 rm -f Min*Socket.* Min*Handler.*
130 rm -f Uid.*
131 rm -f tests/*.cpp
132 ./mkdot.sh
133 rm -rf /usr/local/apache/www.alhem.net/htdocs/Sockets/html
134 doxygen doxygen.cfg
135 ./packdocs.sh Sockets-$(VERSION)-doxygendocs
136 cvs up
137 # $(MAKE) -C ../SocketsLite docs
139 tmpdocs: clean
140 rm -f MinderSocket_T.h
141 rm -f uuid.h
142 rm -f Stdin.*
143 rm -f sockets_test.cpp
144 rm -f ListenSocketBase.*
145 rm -f CircularBuffer.*
146 rm -f ICrypt.* NullCrypt.* CTcpSocket.*
147 rm -f Min*Socket.* Min*Handler.*
148 rm -f Uid.*
149 rm -f tests/*.cpp
150 ./mkdot-tmp.sh
151 rm -rf /usr/local/apache/www.alhem.net/htdocs/Sockets-tmp/html
152 doxygen doxygen-tmp.cfg
153 cvs up
154 $(MAKE) -C ../SocketsLite tmpdocs