1#
2# This Source Code Form is subject to the terms of the Mozilla Public
3# License, v. 2.0. If a copy of the MPL was not distributed with this
4# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
6#! gmake
7
8MOD_DEPTH	= ../../../..
9topsrcdir	= @top_srcdir@
10srcdir		= @srcdir@
11VPATH		= @srcdir@
12
13include $(MOD_DEPTH)/config/autoconf.mk
14
15include $(topsrcdir)/config/config.mk
16
17ifeq (,$(filter-out WIN95 WINCE WINMO, $(OS_TARGET)))
18CSRCS =          \
19    ntmisc.c \
20    ntsec.c   \
21    ntsem.c   \
22    ntinrval.c \
23    ntgc.c \
24	w95thred.c \
25	w95io.c \
26	w95cv.c \
27	w32rng.c \
28	w95sock.c \
29	win32_errors.c \
30    w32ipcsem.c \
31    w32poll.c \
32    w32shm.c \
33    w95dllmain.c \
34    $(NULL)
35else
36CSRCS =          \
37    ntdllmn.c \
38    ntmisc.c \
39    ntsec.c   \
40    ntsem.c   \
41    ntinrval.c \
42    ntgc.c \
43    ntthread.c \
44    ntio.c    \
45	win32_errors.c \
46    w32ipcsem.c \
47    w32poll.c \
48    w32rng.c \
49    w32shm.c \
50    $(NULL)
51endif
52
53TARGETS	= $(OBJS)
54
55INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
56
57DEFINES += -D_NSPR_BUILD_
58
59include $(topsrcdir)/config/rules.mk
60
61export:: $(TARGETS)
62
63# Bug 122433 workaround: disable global optimization (-Og-) on ntio.c.
64ifdef MOZ_OPTIMIZE
65ifeq ($(OS_TARGET), WINNT)
66ifndef NS_USE_GCC
67$(OBJDIR)/ntio.$(OBJ_SUFFIX): ntio.c
68	@$(MAKE_OBJDIR)
69	$(CC) -Fo$@ -c $(CFLAGS) -Og- $<
70endif
71endif
72endif
73