diff Make.msvc @ 0:d39e1d0d75b6

initial add
author paulo@hit-nxdomain.opendns.com
date Sat, 20 Feb 2010 21:18:28 -0800
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Make.msvc	Sat Feb 20 21:18:28 2010 -0800
     1.3 @@ -0,0 +1,191 @@
     1.4 +# $Id: Make.msvc,v 1.11 2006/08/06 17:31:22 mkern Exp $
     1.5 +
     1.6 +GT_MAJOR_VERSION = 0
     1.7 +GT_MINOR_VERSION = 0
     1.8 +GT_MICRO_VERSION = 11
     1.9 +GT_EXTRA_VERSION = 
    1.10 +VERSION = $(GT_MAJOR_VERSION).$(GT_MINOR_VERSION).$(GT_MICRO_VERSION)
    1.11 +
    1.12 +
    1.13 +O = .obj
    1.14 +
    1.15 +
    1.16 +# dynamic by default
    1.17 +!if !defined(static) && !defined(STATIC)
    1.18 +DYNAMIC=1
    1.19 +!endif
    1.20 +
    1.21 +
    1.22 +##########################
    1.23 +# release / debug
    1.24 +##########################
    1.25 +
    1.26 +
    1.27 +!if defined(release) || defined(RELEASE)
    1.28 +
    1.29 +
    1.30 +D=
    1.31 +DEXT=
    1.32 +
    1.33 +
    1.34 +CFLAGS  = $(CFLAGS)  -Ox -G6
    1.35 +LDFLAGS = $(LDFLAGS) -release -FORCE:UNRESOLVED
    1.36 +
    1.37 +#DEFS    = $(DEFS)    -DNDEBUG -UDEBUG -U_DEBUG
    1.38 +DEFS    = $(DEFS)    -D_DEBUG -DDEBUG -UNDEBUG -D_WALL
    1.39 +
    1.40 +
    1.41 +!else # !defined(release) && !defined(RELEASE)
    1.42 +
    1.43 +
    1.44 +D=d
    1.45 +DEXT=d
    1.46 +
    1.47 +
    1.48 +CFLAGS  = $(CFLAGS)  -Od -Gm -GZ -W3 -Zi
    1.49 +DEFS    = $(DEFS)    -D_DEBUG -DDEBUG -UNDEBUG -D_WALL
    1.50 +LDFLAGS = $(LDFLAGS) -debug
    1.51 +
    1.52 +
    1.53 +!endif # defined(release) || defined(RELEASE)
    1.54 +
    1.55 +
    1.56 +##########################
    1.57 +# static / dynamic linking
    1.58 +##########################
    1.59 +
    1.60 +
    1.61 +!if defined(dynamic) || defined(DYNAMIC)
    1.62 +
    1.63 +CFLAGS	= $(CFLAGS) -MD$(D) -DUSE_LTDL
    1.64 +
    1.65 +!else # !(defined(dynamic) || defined(DYNAMIC))
    1.66 +
    1.67 +CFLAGS   = $(CFLAGS) -MT$(D) -UUSE_LTDL
    1.68 +
    1.69 +!endif # defined(dynamic) || defined(DYNAMIC)
    1.70 +
    1.71 +
    1.72 +##########################
    1.73 +# libxml2 support
    1.74 +##########################
    1.75 +
    1.76 +!if defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML)
    1.77 +
    1.78 +
    1.79 +!if "$(LIBXML2_ROOT)" == ""
    1.80 +
    1.81 +LIBXML2_ROOT=$(BUILD_ROOT)\libxml2
    1.82 +
    1.83 +!endif # "$(LIBXML2_ROOT)" == ""
    1.84 +
    1.85 +!if !exists($(LIBXML2_ROOT))
    1.86 +
    1.87 +!error Directory $(LIBXML2_ROOT) not found!
    1.88 +
    1.89 +!endif # !exists($(LIBXML2_ROOT))
    1.90 +
    1.91 +
    1.92 +INCLUDES = $(INCLUDES) -I$(LIBXML2_ROOT)\include
    1.93 +DEFS     = $(DEFS)     -DUSE_LIBXML2
    1.94 +LDFLAGS  = $(LDFLAGS)  -libpath:"$(LIBXML2_ROOT)\win32\bin.msvc"
    1.95 +LIBS     = $(LIBS)      libxml2.lib
    1.96 +
    1.97 +
    1.98 +!if defined(dynamic) || defined(DYNAMIC)
    1.99 +
   1.100 +DIST_DLLS = $(DIST_DLLS) $(LIBXML2_ROOT)\win32\bin.msvc\libxml2.dll
   1.101 +
   1.102 +!endif #  defined(dynamic) || defined(DYNAMIC)
   1.103 +
   1.104 +
   1.105 +!endif # defined(libxml2) || defined(LIBXML2) || defined(xml) || defined(XML)
   1.106 +
   1.107 +
   1.108 +##########################
   1.109 +# zlib support
   1.110 +##########################
   1.111 +
   1.112 +
   1.113 +!if defined(zlib) || defined(ZLIB)
   1.114 +
   1.115 +
   1.116 +!if "$(ZLIB_ROOT)" == ""
   1.117 +
   1.118 +
   1.119 +ZLIB_ROOT=$(BUILD_ROOT)\zlib
   1.120 +
   1.121 +
   1.122 +!endif # "$(ZLIB_ROOT)" == ""
   1.123 +
   1.124 +
   1.125 +!if !exists($(ZLIB_ROOT))
   1.126 +
   1.127 +
   1.128 +!error Directory $(ZLIB_ROOT) not found!
   1.129 +
   1.130 +
   1.131 +!endif # !exists($(ZLIB_ROOT))
   1.132 +
   1.133 +
   1.134 +INCLUDES = $(INCLUDES) -I$(ZLIB_ROOT)
   1.135 +DEFS     = $(DEFS)     -DUSE_ZLIB
   1.136 +LDFLAGS  = $(LDFLAGS)  -libpath:"$(ZLIB_ROOT)"
   1.137 +LIBS     = $(LIBS)     zlib.lib
   1.138 +
   1.139 +
   1.140 +!endif # defined(zlib) || defined(ZLIB)
   1.141 +
   1.142 +
   1.143 +##########################
   1.144 +# general
   1.145 +##########################
   1.146 +
   1.147 +
   1.148 +# temporary till Gnutella doesn't require giFT symbols anymore
   1.149 +GIFT_LIB      		= giFT$(DEXT).lib
   1.150 +GIFT_DLL      		= giFT$(DEXT).dll
   1.151 +GIFT_EXE   			= giFT$(DEXT).exe
   1.152 +
   1.153 +
   1.154 +LIBGIFT_LIB      	= libgiFT$(DEXT).lib
   1.155 +LIBGIFT_DLL      	= libgiFT$(DEXT).dll
   1.156 +LIBGIFT_STATIC   	= libgiFTstatic$(DEXT).lib
   1.157 +LIBGIFTPROTO_LIB	= libgiFTproto$(DEXT).lib
   1.158 +LIBGIFTPROTO_DLL	= libgiFTproto$(DEXT).dll
   1.159 +LIBGIFTPROTO_STATIC	= libgiFTprotostatic$(DEXT).lib
   1.160 +GNUTELLA_LIB         	= Gnutella$(DEXT).lib
   1.161 +GNUTELLA_DLL         	= Gnutella.dll
   1.162 +GNUTELLA_STATIC       	= Gnutellastatic$(DEXT).lib
   1.163 +
   1.164 +
   1.165 +CFLAGS   = $(CFLAGS) -nologo
   1.166 +DEFS     = $(DEFS) -DHAVE_CONFIG_H -DWIN32 -DNO_STRICT
   1.167 +DEFS     = $(DEFS) -DGT_MAJOR_VERSION=\"$(GT_MAJOR_VERSION)\" \
   1.168 +                   -DGT_MINOR_VERSION=\"$(GT_MINOR_VERSION)\" \
   1.169 +                   -DGT_MICRO_VERSION=\"$(GT_MICRO_VERSION)\" \
   1.170 +                   -DGT_EXTRA_VERSION=\"$(GT_EXTRA_VERSION)\"
   1.171 +
   1.172 +
   1.173 +INCLUDES = -I$(BUILD_ROOT) -I$(BUILD_ROOT)\libgift\win32 $(INCLUDES)
   1.174 +
   1.175 +
   1.176 +LDFLAGS  = $(LDFLAGS) -nologo -version:$(VERSION)
   1.177 +LDFLAGS  = $(LDFLAGS) -libpath:"$(BUILD_ROOT)\libgift" -libpath:"$(BUILD_ROOT)\libgift\proto"
   1.178 +
   1.179 +
   1.180 +LIBS     = $(LIBS) wsock32.lib
   1.181 +
   1.182 +
   1.183 +DEFS     = $(DEFS) -D_WINDOWS -U_CONSOLE
   1.184 +LDFLAGS  = $(LDFLAGS) /subsystem:windows
   1.185 +
   1.186 +
   1.187 +##########################
   1.188 +# tools
   1.189 +##########################
   1.190 +
   1.191 +
   1.192 +CC = cl
   1.193 +LD = link
   1.194 +LT = lib