uv: Upgrade to v0.10.19
[platform/upstream/nodejs.git] / deps / uv / build.mk
1 # Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12 #
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 # IN THE SOFTWARE.
20
21 ifdef PLATFORM
22 override PLATFORM := $(shell echo $(PLATFORM) | tr "[A-Z]" "[a-z]")
23 else
24 PLATFORM = $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
25 endif
26
27 CPPFLAGS += -I$(SRCDIR)/include -I$(SRCDIR)/include/uv-private
28
29 ifeq (darwin,$(PLATFORM))
30 SOEXT = dylib
31 else
32 SOEXT = so
33 endif
34
35 ifneq (,$(findstring mingw,$(PLATFORM)))
36 include $(SRCDIR)/config-mingw.mk
37 else
38 include $(SRCDIR)/config-unix.mk
39 endif
40
41 BENCHMARKS= \
42         test/benchmark-async-pummel.o \
43         test/benchmark-async.o \
44         test/benchmark-fs-stat.o \
45         test/benchmark-getaddrinfo.o \
46         test/benchmark-loop-count.o \
47         test/benchmark-million-async.o \
48         test/benchmark-million-timers.o \
49         test/benchmark-multi-accept.o \
50         test/benchmark-ping-pongs.o \
51         test/benchmark-pound.o \
52         test/benchmark-pump.o \
53         test/benchmark-sizes.o \
54         test/benchmark-spawn.o \
55         test/benchmark-tcp-write-batch.o \
56         test/benchmark-thread.o \
57         test/benchmark-udp-pummel.o \
58         test/blackhole-server.o \
59         test/dns-server.o \
60         test/echo-server.o \
61
62 TESTS= \
63         test/blackhole-server.o \
64         test/dns-server.o \
65         test/echo-server.o \
66         test/test-active.o \
67         test/test-async.o \
68         test/test-barrier.o \
69         test/test-callback-order.o \
70         test/test-callback-stack.o \
71         test/test-condvar.o \
72         test/test-connection-fail.o \
73         test/test-cwd-and-chdir.o \
74         test/test-delayed-accept.o \
75         test/test-dlerror.o \
76         test/test-embed.o \
77         test/test-error.o \
78         test/test-fail-always.o \
79         test/test-fs.o \
80         test/test-fs-event.o \
81         test/test-fs-poll.o \
82         test/test-getaddrinfo.o \
83         test/test-get-currentexe.o \
84         test/test-get-loadavg.o \
85         test/test-get-memory.o \
86         test/test-getsockname.o \
87         test/test-hrtime.o \
88         test/test-idle.o \
89         test/test-ipc.o \
90         test/test-ipc-send-recv.o \
91         test/test-loop-handles.o \
92         test/test-loop-stop.o \
93         test/test-multiple-listen.o \
94         test/test-mutexes.o \
95         test/test-osx-select.o \
96         test/test-pass-always.o \
97         test/test-ping-pong.o \
98         test/test-pipe-bind-error.o \
99         test/test-pipe-connect-error.o \
100         test/test-platform-output.o \
101         test/test-poll.o \
102         test/test-poll-close.o \
103         test/test-process-title.o \
104         test/test-ref.o \
105         test/test-run-nowait.o \
106         test/test-run-once.o \
107         test/test-semaphore.o \
108         test/test-shutdown-close.o \
109         test/test-shutdown-eof.o \
110         test/test-signal.o \
111         test/test-signal-multiple-loops.o \
112         test/test-spawn.o \
113         test/test-stdio-over-pipes.o \
114         test/test-tcp-bind6-error.o \
115         test/test-tcp-bind-error.o \
116         test/test-tcp-close.o \
117         test/test-tcp-close-accept.o \
118         test/test-tcp-close-while-connecting.o \
119         test/test-tcp-connect6-error.o \
120         test/test-tcp-connect-error-after-write.o \
121         test/test-tcp-connect-error.o \
122         test/test-tcp-connect-timeout.o \
123         test/test-tcp-flags.o \
124         test/test-tcp-open.o \
125         test/test-tcp-read-stop.o \
126         test/test-tcp-shutdown-after-write.o \
127         test/test-tcp-unexpected-read.o \
128         test/test-tcp-writealot.o \
129         test/test-tcp-write-to-half-open-connection.o \
130         test/test-thread.o \
131         test/test-threadpool.o \
132         test/test-threadpool-cancel.o \
133         test/test-timer-again.o \
134         test/test-timer-from-check.o \
135         test/test-timer.o \
136         test/test-tty.o \
137         test/test-udp-dgram-too-big.o \
138         test/test-udp-ipv6.o \
139         test/test-udp-multicast-join.o \
140         test/test-udp-multicast-ttl.o \
141         test/test-udp-open.o \
142         test/test-udp-options.o \
143         test/test-udp-send-and-recv.o \
144         test/test-util.o \
145         test/test-walk-handles.o \
146         test/test-watcher-cross-stop.o \
147
148 .PHONY: all bench clean clean-platform distclean test
149
150 run-tests$(E): test/run-tests.o test/runner.o $(RUNNER_SRC) $(TESTS) libuv.a
151         $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LDFLAGS)
152
153 run-benchmarks$(E): test/run-benchmarks.o test/runner.o $(RUNNER_SRC) $(BENCHMARKS) libuv.a
154         $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o $@ $^ $(RUNNER_LIBS) $(RUNNER_LDFLAGS)
155
156 test/echo.o: test/echo.c test/echo.h
157
158 test: run-tests$(E)
159         $(CURDIR)/$<
160
161 bench: run-benchmarks$(E)
162         $(CURDIR)/$<
163
164 clean distclean: clean-platform
165         $(RM) libuv.a libuv.$(SOEXT) \
166                 test/run-tests.o test/run-benchmarks.o \
167                 test/run-tests$(E) test/run-benchmarks$(E) \
168                 $(BENCHMARKS) $(TESTS) $(RUNNER_LIBS)