-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNMakefile
85 lines (71 loc) · 2.98 KB
/
NMakefile
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# libsasl
# Copyright (C) 2010 - 1012 Couchbase, Inc
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
CC_NODEBUG = cl.exe /O2 /DNDEBUG /MD /LD
CC_DEBUG = cl.exe /Od /D_DEBUG /RTC1 /Z7 /LDd /W3 /MDd
CFLAGS = /Iinclude /nologo /W3 /EHsc /DWIN32 /FD /c -DLIBISASL_INTERNAL
LDFLAGS = /nologo /dll /incremental:no /opt:ref,icf /version:1.0
LD = link.exe
RM = del
!include "Makefile.am"
# "del" fails if the filename contains '/' as the directory separator.
# The easiest way to fix this is to just replace it with '\'
libsasl_SOURCES=$(libsasl_la_SOURCES:/=\)
# Unfortunately nmake is a bit limited in its substitute functions.
# Work around that by using dobj to represent debug object files ;)
libsasl_la_OBJECTS=$(libsasl_SOURCES:.c=.obj)
libsasl_la_debug_OBJECTS=$(libsasl_SOURCES:.c=.dobj)
all: libsasl_debug.dll libsasl.dll
libsasl.dll: $(libsasl_la_OBJECTS)
$(LD) $(LDFLAGS) /out:libsasl.dll $(libsasl_la_OBJECTS)
libsasl_debug.dll: $(libsasl_la_debug_OBJECTS)
$(LD) $(LDFLAGS) /out:libsasl_debug.dll $(libsasl_la_debug_OBJECTS)
.SUFFIXES: .c .obj .dobj .res
.c.dobj:
$(CC_DEBUG) $(CFLAGS) /Fo"$@" $<
.c.obj:
$(CC_NODEBUG) $(CFLAGS) /Fo"$@" $<
clean:
-del $(libsasl_la_debug_OBJECTS) \
$(libsasl_la_OBJECTS) \
libsasl.dll libsasl.exp libsasl.lib \
libsasl_debug.dll libsasl_debug.exp libsasl_debug.lib \
vc100.idb vc100.pdb
INSTALL=..\deps
INSTALLDIRS=$(INSTALL) $(INSTALL)\include $(INSTALL)\include\sasl $(INSTALL)\lib $(INSTALL)\bin
install: $(INSTALLDIRS) libsasl.dll libsasl_debug.dll
copy include\sasl\** $(INSTALL)\include\sasl
copy libsasl.dll $(INSTALL)\lib
copy libsasl.dll $(INSTALL)\bin
copy libsasl.exp $(INSTALL)\lib
copy libsasl.lib $(INSTALL)\lib
copy libsasl_debug.dll $(INSTALL)\lib
copy libsasl_debug.dll $(INSTALL)\bin
copy libsasl_debug.exp $(INSTALL)\lib
copy libsasl_debug.lib $(INSTALL)\lib
uninstall:
-del $(INSTALL)\lib\libsasl_debug.dll \
$(INSTALL)\bin\libsasl_debug.dll \
$(INSTALL)\lib\libsasl_debug.exp \
$(INSTALL)\lib\libsasl_debug.lib \
$(INSTALL)\lib\libsasl.dll \
$(INSTALL)\bin\libsasl.dll \
$(INSTALL)\lib\libsasl.exp \
$(INSTALL)\lib\libsasl.lib \
$(INSTALL)\include\sasl\isasl.h \
$(INSTALL)\include\sasl\sasl.h \
$(INSTALL)\include\sasl\visibility.h
-rmdir $(INSTALL)\lib $(INSTALL)\bin $(INSTALL)\include\sasl $(INSTALL)\include $(INSTALL)
$(INSTALL) $(INSTALL)\include $(INSTALL)\include\sasl $(INSTALL)\lib $(INSTALL)\bin:; -@mkdir $@