PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/config-mingw.mk

http://github.com/joyent/libuv
Makefile | 51 lines | 21 code | 9 blank | 21 comment | 0 complexity | 0b19d4a293eb2ce13fae80815875dc86 MD5 | raw file
 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# Use make -f Makefile.gcc PREFIX=i686-w64-mingw32-
22# for cross compilation
23CC = $(PREFIX)gcc
24AR = $(PREFIX)ar
25E=.exe
26
27CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0600
28LINKFLAGS=-lm
29
30WIN_SRCS=$(wildcard src/win/*.c)
31WIN_OBJS=$(WIN_SRCS:.c=.o)
32
33RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup?
34RUNNER_LINKFLAGS=$(LINKFLAGS)
35RUNNER_LIBS=-lws2_32 -lpsapi -liphlpapi
36RUNNER_SRC=test/runner-win.c
37
38libuv.a: $(WIN_OBJS) src/fs-poll.o src/inet.o src/uv-common.o
39	$(AR) rcs $@ $^
40
41src/%.o: src/%.c include/uv.h include/uv-private/uv-win.h
42	$(CC) $(CFLAGS) -c $< -o $@
43
44src/win/%.o: src/win/%.c include/uv.h include/uv-private/uv-win.h src/win/internal.h
45	$(CC) $(CFLAGS) -o $@ -c $<
46
47clean-platform:
48	-rm -f src/win/*.o
49
50distclean-platform:
51	-rm -f src/win/*.o