Permalink
Browse files

Fix build with nmake and Visual Studio 2008

  • Loading branch information...
1 parent 9ab6325 commit 170ff3e1118021413b76568a1b0a4aef18d1771e @trondn committed Mar 11, 2013
Showing with 36 additions and 0 deletions.
  1. +35 −0 NMakefile
  2. +1 −0 vacuum.c
View
@@ -0,0 +1,35 @@
+# Copyright (C) 2010 - 1013 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.
+
+INSTALL=..\deps
+CC = cl.exe /O2 /DNDEBUG /MD /LD
+CFLAGS = /I$(INSTALL)\include /I. /nologo /W3 /EHsc /DWIN32 /FD /c -D_CRT_SECURE_NO_WARNINGS
+LDFLAGS = /nologo /LIBPATH:$(INSTALL)\lib
+LD = link.exe
+
+
+OBJS=vacuum.obj cJSON.obj getopt.obj
+all: vacuum.exe
+
+.SUFFIXES: .c .obj
+
+.c.obj:
+ @$(CC) $(CFLAGS) /Fo"$@" $<
+
+vacuum.exe: $(OBJS)
+ @$(LD) $(LDFLAGS) -out:vacuum.exe $(OBJS) libcouchbase.lib
+
+clean:
+ -del $(OBJS) vacuum.exe
View
@@ -15,6 +15,7 @@
*/
#ifdef WIN32
+#include <winsock2.h>
#include <Windows.h>
#include <direct.h>
#include <io.h>

0 comments on commit 170ff3e

Please sign in to comment.