annotate Make.msvc @ 0:d39e1d0d75b6

initial add
author paulo@hit-nxdomain.opendns.com
date Sat, 20 Feb 2010 21:18:28 -0800
parents
children
rev   line source
paulo@0 1 # $Id: Make.msvc,v 1.11 2006/08/06 17:31:22 mkern Exp $
paulo@0 2
paulo@0 3 GT_MAJOR_VERSION = 0
paulo@0 4 GT_MINOR_VERSION = 0
paulo@0 5 GT_MICRO_VERSION = 11
paulo@0 6 GT_EXTRA_VERSION =
paulo@0 7 VERSION = $(GT_MAJOR_VERSION).$(GT_MINOR_VERSION).$(GT_MICRO_VERSION)
paulo@0 8
paulo@0 9
paulo@0 10 O = .obj
paulo@0 11
paulo@0 12
paulo@0 13 # dynamic by default
paulo@0 14 !if !defined(static) && !defined(STATIC)
paulo@0 15 DYNAMIC=1
paulo@0 16 !endif
paulo@0 17
paulo@0 18
paulo@0 19 ##########################
paulo@0 20 # release / debug
paulo@0 21 ##########################
paulo@0 22
paulo@0 23
paulo@0 24 !if defined(release) || defined(RELEASE)
paulo@0 25
paulo@0 26
paulo@0 27 D=
paulo@0 28 DEXT=
paulo@0 29
paulo@0 30
paulo@0 31 CFLAGS = $(CFLAGS) -Ox -G6
paulo@0 32 LDFLAGS = $(LDFLAGS) -release -FORCE:UNRESOLVED
paulo@0 33
paulo@0 34 #DEFS = $(DEFS) -DNDEBUG -UDEBUG -U_DEBUG
paulo@0 35 DEFS = $(DEFS) -D_DEBUG -DDEBUG -UNDEBUG -D_WALL
paulo@0 36
paulo@0 37
paulo@0 38 !else # !defined(release) && !defined(RELEASE)
paulo@0 39
paulo@0 40
paulo@0 41 D=d
paulo@0 42 DEXT=d
paulo@0 43
paulo@0 44
paulo@0 45 CFLAGS = $(CFLAGS) -Od -Gm -GZ -W3 -Zi
paulo@0 46 DEFS = $(DEFS) -D_DEBUG -DDEBUG -UNDEBUG -D_WALL
paulo@0 47 LDFLAGS = $(LDFLAGS) -debug
paulo@0 48
paulo@0 49
paulo@0 50 !endif # defined(release) || defined(RELEASE)
paulo@0 51
paulo@0 52
paulo@0 53 ##########################
paulo@0 54 # static / dynamic linking
paulo@0 55 ##########################
paulo@0 56
paulo@0 57
paulo@0 58 !if defined(dynamic) || defined(DYNAMIC)
paulo@0 59
paulo@0 60 CFLAGS = $(CFLAGS) -MD$(D) -DUSE_LTDL
paulo@0 61
paulo@0 62 !else # !(defined(dynamic) || defined(DYNAMIC))
paulo@0 63
paulo@0 64 CFLAGS = $(CFLAGS) -MT$(D) -UUSE_LTDL
paulo@0 65
paulo@0 66 !endif # defined(dynamic) || defined(DYNAMIC)
paulo@0 67
paulo@0 68
paulo@0 69 ##########################
paulo@0 70 # libxml2 support
paulo@0 71 ##########################
paulo@0 72
paulo@0 73 !if defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML)
paulo@0 74
paulo@0 75
paulo@0 76 !if "$(LIBXML2_ROOT)" == ""
paulo@0 77
paulo@0 78 LIBXML2_ROOT=$(BUILD_ROOT)\libxml2
paulo@0 79
paulo@0 80 !endif # "$(LIBXML2_ROOT)" == ""
paulo@0 81
paulo@0 82 !if !exists($(LIBXML2_ROOT))
paulo@0 83
paulo@0 84 !error Directory $(LIBXML2_ROOT) not found!
paulo@0 85
paulo@0 86 !endif # !exists($(LIBXML2_ROOT))
paulo@0 87
paulo@0 88
paulo@0 89 INCLUDES = $(INCLUDES) -I$(LIBXML2_ROOT)\include
paulo@0 90 DEFS = $(DEFS) -DUSE_LIBXML2
paulo@0 91 LDFLAGS = $(LDFLAGS) -libpath:"$(LIBXML2_ROOT)\win32\bin.msvc"
paulo@0 92 LIBS = $(LIBS) libxml2.lib
paulo@0 93
paulo@0 94
paulo@0 95 !if defined(dynamic) || defined(DYNAMIC)
paulo@0 96
paulo@0 97 DIST_DLLS = $(DIST_DLLS) $(LIBXML2_ROOT)\win32\bin.msvc\libxml2.dll
paulo@0 98
paulo@0 99 !endif # defined(dynamic) || defined(DYNAMIC)
paulo@0 100
paulo@0 101
paulo@0 102 !endif # defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML)
paulo@0 103
paulo@0 104
paulo@0 105 ##########################
paulo@0 106 # zlib support
paulo@0 107 ##########################
paulo@0 108
paulo@0 109
paulo@0 110 !if defined(zlib) || defined(ZLIB)
paulo@0 111
paulo@0 112
paulo@0 113 !if "$(ZLIB_ROOT)" == ""
paulo@0 114
paulo@0 115
paulo@0 116 ZLIB_ROOT=$(BUILD_ROOT)\zlib
paulo@0 117
paulo@0 118
paulo@0 119 !endif # "$(ZLIB_ROOT)" == ""
paulo@0 120
paulo@0 121
paulo@0 122 !if !exists($(ZLIB_ROOT))
paulo@0 123
paulo@0 124
paulo@0 125 !error Directory $(ZLIB_ROOT) not found!
paulo@0 126
paulo@0 127
paulo@0 128 !endif # !exists($(ZLIB_ROOT))
paulo@0 129
paulo@0 130
paulo@0 131 INCLUDES = $(INCLUDES) -I$(ZLIB_ROOT)
paulo@0 132 DEFS = $(DEFS) -DUSE_ZLIB
paulo@0 133 LDFLAGS = $(LDFLAGS) -libpath:"$(ZLIB_ROOT)"
paulo@0 134 LIBS = $(LIBS) zlib.lib
paulo@0 135
paulo@0 136
paulo@0 137 !endif # defined(zlib) || defined(ZLIB)
paulo@0 138
paulo@0 139
paulo@0 140 ##########################
paulo@0 141 # general
paulo@0 142 ##########################
paulo@0 143
paulo@0 144
paulo@0 145 # temporary till Gnutella doesn't require giFT symbols anymore
paulo@0 146 GIFT_LIB = giFT$(DEXT).lib
paulo@0 147 GIFT_DLL = giFT$(DEXT).dll
paulo@0 148 GIFT_EXE = giFT$(DEXT).exe
paulo@0 149
paulo@0 150
paulo@0 151 LIBGIFT_LIB = libgiFT$(DEXT).lib
paulo@0 152 LIBGIFT_DLL = libgiFT$(DEXT).dll
paulo@0 153 LIBGIFT_STATIC = libgiFTstatic$(DEXT).lib
paulo@0 154 LIBGIFTPROTO_LIB = libgiFTproto$(DEXT).lib
paulo@0 155 LIBGIFTPROTO_DLL = libgiFTproto$(DEXT).dll
paulo@0 156 LIBGIFTPROTO_STATIC = libgiFTprotostatic$(DEXT).lib
paulo@0 157 GNUTELLA_LIB = Gnutella$(DEXT).lib
paulo@0 158 GNUTELLA_DLL = Gnutella.dll
paulo@0 159 GNUTELLA_STATIC = Gnutellastatic$(DEXT).lib
paulo@0 160
paulo@0 161
paulo@0 162 CFLAGS = $(CFLAGS) -nologo
paulo@0 163 DEFS = $(DEFS) -DHAVE_CONFIG_H -DWIN32 -DNO_STRICT
paulo@0 164 DEFS = $(DEFS) -DGT_MAJOR_VERSION=\"$(GT_MAJOR_VERSION)\" \
paulo@0 165 -DGT_MINOR_VERSION=\"$(GT_MINOR_VERSION)\" \
paulo@0 166 -DGT_MICRO_VERSION=\"$(GT_MICRO_VERSION)\" \
paulo@0 167 -DGT_EXTRA_VERSION=\"$(GT_EXTRA_VERSION)\"
paulo@0 168
paulo@0 169
paulo@0 170 INCLUDES = -I$(BUILD_ROOT) -I$(BUILD_ROOT)\libgift\win32 $(INCLUDES)
paulo@0 171
paulo@0 172
paulo@0 173 LDFLAGS = $(LDFLAGS) -nologo -version:$(VERSION)
paulo@0 174 LDFLAGS = $(LDFLAGS) -libpath:"$(BUILD_ROOT)\libgift" -libpath:"$(BUILD_ROOT)\libgift\proto"
paulo@0 175
paulo@0 176
paulo@0 177 LIBS = $(LIBS) wsock32.lib
paulo@0 178
paulo@0 179
paulo@0 180 DEFS = $(DEFS) -D_WINDOWS -U_CONSOLE
paulo@0 181 LDFLAGS = $(LDFLAGS) /subsystem:windows
paulo@0 182
paulo@0 183
paulo@0 184 ##########################
paulo@0 185 # tools
paulo@0 186 ##########################
paulo@0 187
paulo@0 188
paulo@0 189 CC = cl
paulo@0 190 LD = link
paulo@0 191 LT = lib