Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

128 lines (102 sloc) 4.864 kb
# libvbucket
# 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 /I. /Iwin32 /nologo /W3 /EHsc /DWIN32 /FD /c -D_CRT_SECURE_NO_WARNINGS -DBUILDING_LIBVBUCKET=1
LDFLAGS = /nologo /dll /incremental:no /opt:ref,icf /version:1.0
LD = link.exe
RM = del
libvbucket_SOURCES= src\crc32.c src\cJSON.c src\vbucket.c src\ketama.c src\rfc1321\md5c.c
vbucketkeygen_SOURCES = src\vbucketkeygen.c
testketama_SOURCES = tests\testketama.c src\ketama.c src\rfc1321\md5c.c
regression_SOURCES = tests\regression.c
testapp_SOURCES = tests\testapp.c
vbuckettool_SOURCES=src\vbuckettool.c
# Unfortunately nmake is a bit limited in its substitute functions.
# Work around that by using dobj to represent debug object files ;)
libvbucket_la_OBJECTS=$(libvbucket_SOURCES:.c=.obj)
libvbucket_la_debug_OBJECTS=$(libvbucket_SOURCES:.c=.dobj)
vbucketkeygen_OBJECTS=$(vbuckettool_SOURCES:.c=.dobj)
testketama_OBJECTS=$(testketama_SOURCES:.c=.dobj)
regression_OBJECTS=$(regression_SOURCES:.c=.dobj)
testapp_OBJECTS=$(testapp_SOURCES:.c=.dobj)
vbuckettool_OBJECTS=$(vbuckettool_SOURCES:.c=.dobj)
all_OBJS=$(vbucketkeygen_OBJECTS) $(testketama_OBJECTS) \
$(testketama_OBJECTS) $(regression_OBJECTS) \
$(testapp_OBJECTS) $(vbuckettool_OBJECTS) \
$(libvbucket_la_OBJECTS) $(libvbucket_la_debug_OBJECTS)
check_PROGRAMS = testapp.exe regression.exe testketama.exe
bin_PROGRAMS = vbuckettool.exe vbucketkeygen.exe
all: libvbucket_debug.dll \
libvbucket.dll \
$(bin_PROGRAMS)
check: $(check_PROGRAMS)
set srcdir=.
for %%t in ($(check_PROGRAMS)) do %t
libvbucket.dll: $(libvbucket_la_OBJECTS)
$(LD) $(LDFLAGS) /out:libvbucket.dll $(libvbucket_la_OBJECTS)
libvbucket_debug.dll: $(libvbucket_la_debug_OBJECTS)
$(LD) $(LDFLAGS) /out:libvbucket_debug.dll $(libvbucket_la_debug_OBJECTS)
vbucketkeygen.exe: $(vbucketkeygen_OBJECTS) libvbucket.dll
$(LD) -out:vbucketkeygen.exe $(vbucketkeygen_OBJECTS) libvbucket.lib
testketama.exe: $(testketama_OBJECTS) libvbucket_debug.dll
$(LD) -out:testketama.exe $(testketama_OBJECTS) libvbucket_debug.lib
regression.exe: $(regression_OBJECTS) libvbucket_debug.dll
$(LD) -out:regression.exe $(regression_OBJECTS) libvbucket_debug.lib
testapp.exe: $(testapp_OBJECTS) libvbucket_debug.dll
$(LD) -out:testapp.exe $(testapp_OBJECTS) libvbucket_debug.lib
vbuckettool.exe: $(vbuckettool_OBJECTS) libvbucket.dll
$(LD) -out:vbuckettool.exe $(vbuckettool_OBJECTS) libvbucket.lib
.SUFFIXES: .c .obj .dobj .res
.c.dobj:
$(CC_DEBUG) $(CFLAGS) /Fo"$@" $<
.c.obj:
$(CC_NODEBUG) $(CFLAGS) /Fo"$@" $<
clean:
-del $(all_OBJECTS) \
libvbucket.dll libvbucket.exp libvbucket.lib \
libvbucket_debug.dll libvbucket_debug.exp libvbucket_debug.lib \
vc100.idb vc100.pdb \
$(bin_PROGRAMS) $(check_PROGRAMS)
INSTALL=..\deps
INSTALLDIRS=$(INSTALL) $(INSTALL)\include $(INSTALL)\include\libvbucket $(INSTALL)\lib $(INSTALL)\bin
install: $(INSTALLDIRS) libvbucket.dll libvbucket_debug.dll $(bin_PROGRAMS)
copy include\libvbucket\** $(INSTALL)\include\libvbucket
copy libvbucket.dll $(INSTALL)\lib
copy libvbucket.dll $(INSTALL)\bin
copy libvbucket.exp $(INSTALL)\lib
copy libvbucket.lib $(INSTALL)\lib
copy libvbucket_debug.dll $(INSTALL)\lib
copy libvbucket_debug.dll $(INSTALL)\bin
copy libvbucket_debug.exp $(INSTALL)\lib
copy libvbucket_debug.lib $(INSTALL)\lib
copy vbucketkeygen.exe $(INSTALL)\bin
copy vbuckettool.exe $(INSTALL)\bin
uninstall:
-del $(INSTALL)\lib\libvbucket_debug.dll \
$(INSTALL)\bin\libvbucket_debug.dll \
$(INSTALL)\lib\libvbucket_debug.exp \
$(INSTALL)\lib\libvbucket_debug.lib \
$(INSTALL)\lib\libvbucket.dll \
$(INSTALL)\bin\libvbucket.dll \
$(INSTALL)\lib\libvbucket.exp \
$(INSTALL)\lib\libvbucket.lib \
$(INSTALL)\include\libvbucket\vbucket.h \
$(INSTALL)\include\libvbucket\visibility.h \
$(INSTALL)\bin\vbucketkeygen.exe \
$(INSTALL)\bin\vbuckettool.exe
-rmdir $(INSTALL)\lib $(INSTALL)\bin $(INSTALL)\include\libvbucket $(INSTALL)\include $(INSTALL)
$(INSTALL) $(INSTALL)\include $(INSTALL)\include\libvbucket $(INSTALL)\lib $(INSTALL)\bin:; -@mkdir $@
Jump to Line
Something went wrong with that request. Please try again.