cURL / Mailing Lists / curl-library / Single Mail

curl-library

new makefile for Visual C++

From: Piotr Dobrogost <pd_at_curlpp.org>
Date: Tue, 24 Feb 2009 04:14:01 +0100

Hi

I'm attaching a new makefile for Visual C++. I wrote it from scratch;
it's smaller, cleaner and more flexible.
If someone could try it out and give me some feedback that would be great.

Usage:
nmake /f makefile.vc
        [BUILD_CFG=[[dynamic|static]-[debug|release]]]
        [RTLIB_CFG=[[[dynamic|static]-[debug|release]]|buildcfg]]
        [OPENSSL_CFG=[[[dynamic|static]-[debug|release]]|buildcfg]]
        [ZLIB_CFG=[[[dynamic|static]-[debug|release]]|buildcfg]]

All options of makefile are optional :)
If OPENSSL_CFG is not present libcurl will be compiled without OpenSSL
If ZLIB_CFG is not present libcurl will be compiled without zlib
Default for BUILD_CFG is dynamic-release
Setting buildcfg as value means setting the same value as BUILD_CFG has
If RTLIB_CFG is not present it's the same as setting it to buildcfg

Output files are by default put in "out" directory in the root of source
tree.
Object files are put in the "obj" subdirectory of output directory.
After build you'll find build-setup file with saved build options.

Some quick examples for those using current VC makefile;

Was
makefile.vc CFG=release-dll-ssl-dll-zlib-dll
now is
makefile.vc BUILD_CFG=dynamic-release OPENSSL_CFG=dynamic-release
ZLIB_CFG=dynamic-relase
or more simple
makefile.vc BUILD_CFG=dynamic-release OPENSSL_CFG=buildcfg ZLIB_CFG=buildcfg
or even more simple, just
makefile.vc

Was
makefile.vc CFG=debug-ssl-dll-zlib
now is
makefile.vc BUILD_CFG=static-debug OPENSSL_CFG=dynamic-debug
ZLIB_CFG=static-debug

Remember to set paths in makefile before use or give them in command
line as parameters!!!

You need appropriate named OpenSSL libs - take a look at
http://curlpp.org/index.php/faq/50-how-to-build-openssl-on-win32-platform-for-use-with-libcurl

The lightest dynamic version of libcurl - with dynamic RTL, no OpenSSL
and no zlib is 175 616 bytes large. Adding dynamic OpenSSL and dynamic
zlib makes it 199 168 bytes. On the other end there is static debug
version with static, debug OpenSSL and static zlib compiled in and then
it's 7 023 892 bytes large.

Regards
Piotr Dobrogost

# Makefile for building libcurl with MSVC
#
# Piotr Dobrogost - pd.curlpp.org (Feb 2009)
#
# Usage:
# nmake /f makefile.vc9
# [BUILD_CFG=[[dynamic|static]-[debug|release]]]
# [RTLIB_CFG=[[[dynamic|static]-[debug|release]]|buildcfg]]
# [OPENSSL_CFG=[[[dynamic|static]-[debug|release]]|buildcfg]]
# [ZLIB_CFG=[[[dynamic|static]-[debug|release]]|buildcfg]]
#
# All options of makefile are optional :)
# If OPENSSL_CFG is not present libcurl will be compiled without OpenSSL
# If ZLIB_CFG is not present libcurl will be compiled without zlib
# Default for BUILD_CFG is dynamic-release
# Setting buildcfg as value means setting the same value as BUILD_CFG has
# If RTLIB_CFG is not present it's the same as setting it to buildcfg
#
# Should be invoked from curl-<version>/lib/ directory

# DEFAULTS SECTION - default values of some variables
#####################################################

LIB_NAME = libcurl
DEFAULT_DIR_OUT = ..\out\$(BUILD_CFG)

DEFAULT_BUILD_TYPE = dynamic
DEFAULT_BUILD_MODE = release

DEFAULT_DYNAMIC_RELEASE_SUFFIX = MD
DEFAULT_DYNAMIC_DEBUG_SUFFIX = MDd
DEFAULT_STATIC_RELEASE_SUFFIX = MT
DEFAULT_STATIC_DEBUG_SUFFIX = MTd

DEFAULT_BUILD_SETUP_FILE = build-setup

WINDOWS_SDK_LIBS_1 = ws2_32
WINDOWS_SDK_LIBS_2 = wldap32
DEFAULT_WINDOWS_SDK_PATH = C:\Program Files\Microsoft SDKs\Windows\v6.0A

OPENSSL_LIBS_1 = libeay32
OPENSSL_LIBS_2 = ssleay32
DEFAULT_OPENSSL_PATH= c:\Program Files\openssl
OPENSSL_STATIC_DEPENDIECIES = gdi32.lib advapi32.lib user32.lib
OPENSSL_STATIC_DEPENDIECIES_PATH = $(WINDOWS_SDK_PATH)

ZLIB_LIBS_STATIC = zlib
ZLIB_LIBS_DYNAMIC = zdll
DEFAULT_ZLIB_PATH = c:\Program Files\zlib

!IFNDEF BUILD_CFG
BUILD_CFG = $(DEFAULT_BUILD_TYPE)-$(DEFAULT_BUILD_MODE)
!ENDIF
BUILD_SETUP = $(BUILD_SETUP) BUILD_CONFIG=$(BUILD_CFG)

!IFNDEF DIR_OUT
DIR_OUT = $(DEFAULT_DIR_OUT)
!ENDIF
DIR_OBJ = $(DIR_OUT)\obj
TARGET = $(LIB_NAME)$(TARGET_SUFFIX)

# GLOBAL SECTION - common options needed for DEBUG/RELEASE and DYNAMIC/STATIC variants of builds
################################################################################################

# BASE entity

# definitions to be used in following compiler part

COMPILER = cl.exe

C_DEFS = /DWIN32 /DBUILDING_LIBCURL
C_INCLUDES = /I. /I../include
CFLAGS_STD = $(C_INCLUDES) $(C_DEFS) /nologo /W0 /EHsc /FD /c
!IFDEF WINDOWS_SSPI
CFLAGS_STD = $(CFLAGS_STD) /DUSE_WINDOWS_SSPI
!ENDIF

CFLAGS_DYNAMIC = /UCURL_STATICLIB
CFLAGS_STATIC = /DCURL_STATICLIB

CFLAGS_DEBUG = /D_DEBUG/Od /Gm /Zi /RTC1
CFLAGS_RELEASE = /DNDEBUG /O2

CFLAGS =

# compiler part

!IF "$(BUILD_CFG)" == "dynamic-release"
CFLAGS = $(CFLAGS) $(CFLAGS_DYNAMIC) $(CFLAGS_RELEASE)
!ENDIF
!IF "$(BUILD_CFG)" == "dynamic-debug"
CFLAGS = $(CFLAGS) $(CFLAGS_DYNAMIC) $(CFLAGS_DEBUG)
!ENDIF
!IF "$(BUILD_CFG)" == "static-release"
CFLAGS = $(CFLAGS) $(CFLAGS_STATIC) $(CFLAGS_RELEASE)
!ENDIF
!IF "$(BUILD_CFG)" == "static-debug"
CFLAGS = $(CFLAGS) $(CFLAGS_STATIC) $(CFLAGS_DEBUG)
!ENDIF

# definitions to be used in following linker part

LINKER = link.exe

LFLAGS_STD = /nologo

LFLAGS_DYNAMIC = /dll /incremental:no /opt:noref
LFLAGS_STATIC = /lib

LFLAGS =

# linker part

!IF "$(BUILD_CFG)" == "dynamic-debug"
LFLAGS = $(LFLAGS) $(LFLAGS_DYNAMIC) /debug
!ENDIF
!IF "$(BUILD_CFG)" == "dynamic-release"
LFLAGS = $(LFLAGS) $(LFLAGS_DYNAMIC)
!ENDIF
!IF "$(BUILD_CFG)" == "static-debug"
LFLAGS = $(LFLAGS) $(LFLAGS_STATIC)
!ENDIF
!IF "$(BUILD_CFG)" == "static-release"
LFLAGS = $(LFLAGS) $(LFLAGS_STATIC)
!ENDIF

# RUN-TIME library

!IFNDEF RTLIB_CFG
RTLIB_CONFIG = $(BUILD_CFG)
!ELSE
!IF "$(RTLIB_CFG)" == "buildcfg"
RTLIB_CONFIG = $(BUILD_CFG)
!ELSE
RTLIB_CONFIG = $(RTLIB_CFG)
!ENDIF
!ENDIF
BUILD_SETUP = $(BUILD_SETUP) RTLIB_CONFIG=$(RTLIB_CONFIG)

# compiler part

!IF "$(RTLIB_CONFIG)" == "dynamic-release"
CFLAGS = /MD $(CFLAGS)
!ENDIF
!IF "$(RTLIB_CONFIG)" == "dynamic-debug"
CFLAGS = /MDd $(CFLAGS)
!ENDIF
!IF "$(RTLIB_CONFIG)" == "static-release"
CFLAGS = /MT $(CFLAGS)
!ENDIF
!IF "$(RTLIB_CONFIG)" == "static-debug"
CFLAGS = /MTd $(CFLAGS)
!ENDIF

# linker part
# none

# DEPENDENCIES SECTION
######################

CFLAGS_DEPENDENCIES =
LFLAGS_DEPENDENCIES =

# WINDOWS_SDK
# ===================================================================

!IFNDEF WINDOWS_SDK_CFG
WINDOWS_SDK_CFG = $(BUILD_CFG)
!ENDIF

#!IFDEF WINDOWS_SSPI
!IFNDEF WINDOWS_SDK_PATH
WINDOWS_SDK_PATH = $(DEFAULT_WINDOWS_SDK_PATH)
!ENDIF
#!ENDIF

# compiler part

CFLAGS_WINDOWS_SDK = /I "$(WINDOWS_SDK_PATH)/include"

!IF "$(WINDOWS_SDK_CFG)" == "dynamic-release"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_WINDOWS_SDK)
!ENDIF
!IF "$(WINDOWS_SDK_CFG)" == "dynamic-debug"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_WINDOWS_SDK)
!ENDIF
!IF "$(WINDOWS_SDK_CFG)" == "static-release"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_WINDOWS_SDK)
!ENDIF
!IF "$(WINDOWS_SDK_CFG)" == "static-debug"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_WINDOWS_SDK)
!ENDIF

# linker part

LFLAGS_WINDOWS_SDK = /LIBPATH:"$(WINDOWS_SDK_PATH)/lib"

!IF "$(WINDOWS_SDK_CFG)" == "dynamic-release"
WINDOWS_SDK_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_WINDOWS_SDK) \
                      $(WINDOWS_SDK_LIBS_1)$(WINDOWS_SDK_SUFFIX).lib \
                      $(WINDOWS_SDK_LIBS_2)$(WINDOWS_SDK_SUFFIX).lib
!ENDIF
!IF "$(WINDOWS_SDK_CFG)" == "dynamic-debug"
WINDOWS_SDK_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_WINDOWS_SDK) \
                      $(WINDOWS_SDK_LIBS_1)$(WINDOWS_SDK_SUFFIX).lib \
                      $(WINDOWS_SDK_LIBS_2)$(WINDOWS_SDK_SUFFIX).lib
!ENDIF
!IF "$(WINDOWS_SDK_CFG)" == "static-release"
WINDOWS_SDK_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_WINDOWS_SDK) \
                      $(WINDOWS_SDK_LIBS_1)$(WINDOWS_SDK_SUFFIX).lib \
                      $(WINDOWS_SDK_LIBS_2)$(WINDOWS_SDK_SUFFIX).lib
!ENDIF
!IF "$(WINDOWS_SDK_CFG)" == "static-debug"
WINDOWS_SDK_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_WINDOWS_SDK) \
                      $(WINDOWS_SDK_LIBS_1)$(WINDOWS_SDK_SUFFIX).lib \
                      $(WINDOWS_SDK_LIBS_2)$(WINDOWS_SDK_SUFFIX).lib
!ENDIF

# OPENSSL
# ===================================================================

!IFDEF OPENSSL_CFG

!IF "$(OPENSSL_CFG)" == "buildcfg"
OPENSSL_CONFIG = $(BUILD_CFG)
!ELSE
OPENSSL_CONFIG = $(OPENSSL_CFG)
!ENDIF

BUILD_SETUP = $(BUILD_SETUP) OPENSSL_CONFIG=$(OPENSSL_CONFIG)

!IFNDEF OPENSSL_PATH
OPENSSL_PATH = $(DEFAULT_OPENSSL_PATH)
!ENDIF

# compiler part

CFLAGS_OPENSSL = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"

!IF "$(OPENSSL_CONFIG)" == "dynamic-release"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_OPENSSL)
!ENDIF
!IF "$(OPENSSL_CONFIG)" == "dynamic-debug"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_OPENSSL)
!ENDIF
!IF "$(OPENSSL_CONFIG)" == "static-release"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_OPENSSL)
!ENDIF
!IF "$(OPENSSL_CONFIG)" == "static-debug"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_OPENSSL)
!ENDIF

# linker part

LFLAGS_OPENSSL = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
LFLAGS_OPENSSL_STATIC = /LIBPATH:"$(OPENSSL_STATIC_DEPENDIECIES_PATH)/lib"

!IF "$(OPENSSL_CONFIG)" == "dynamic-release"
OPENSSL_SUFFIX = $(DEFAULT_DYNAMIC_RELEASE_SUFFIX)
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) \
                      $(LFLAGS_OPENSSL) \
                      $(OPENSSL_LIBS_1)$(OPENSSL_SUFFIX).lib $(OPENSSL_LIBS_2)$(OPENSSL_SUFFIX).lib
!ENDIF
!IF "$(OPENSSL_CONFIG)" == "dynamic-debug"
OPENSSL_SUFFIX = $(DEFAULT_DYNAMIC_DEBUG_SUFFIX)
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) \
                      $(LFLAGS_OPENSSL) \
                      $(OPENSSL_LIBS_1)$(OPENSSL_SUFFIX).lib $(OPENSSL_LIBS_2)$(OPENSSL_SUFFIX).lib
!ENDIF
!IF "$(OPENSSL_CONFIG)" == "static-release"
OPENSSL_SUFFIX = $(DEFAULT_STATIC_RELEASE_SUFFIX)
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) \
                      $(LFLAGS_OPENSSL) \
                      $(OPENSSL_LIBS_1)$(OPENSSL_SUFFIX).lib $(OPENSSL_LIBS_2)$(OPENSSL_SUFFIX).lib \
                      $(LFLAGS_OPENSSL_STATIC) \
                                          $(OPENSSL_STATIC_DEPENDIECIES)
!ENDIF
!IF "$(OPENSSL_CONFIG)" == "static-debug"
OPENSSL_SUFFIX = $(DEFAULT_STATIC_DEBUG_SUFFIX)
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) \
                      $(LFLAGS_OPENSSL) \
                      $(OPENSSL_LIBS_1)$(OPENSSL_SUFFIX).lib $(OPENSSL_LIBS_2)$(OPENSSL_SUFFIX).lib \
                      $(LFLAGS_OPENSSL_STATIC) \
                      $(OPENSSL_STATIC_DEPENDIECIES)
!ENDIF

!ENDIF

# ZLIB
# ===================================================================

!IFDEF ZLIB_CFG

!IF "$(ZLIB_CFG)" == "buildcfg"
ZLIB_CONFIG = $(BUILD_CFG)
!ElSE
ZLIB_CONFIG = $(ZLIB_CFG)
!ENDIF
BUILD_SETUP = $(BUILD_SETUP) ZLIB_CONFIG=$(ZLIB_CONFIG)

!IFNDEF ZLIB_PATH
ZLIB_PATH = $(DEFAULT_ZLIB_PATH)
!ENDIF

# compiler part

CFLAGS_ZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"

!IF "$(ZLIB_CONFIG)" == "dynamic-release"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_ZLIB)
!ENDIF
!IF "$(ZLIB_CONFIG)" == "dynamic-debug"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_ZLIB)
!ENDIF
!IF "$(ZLIB_CONFIG)" == "static-release"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_ZLIB)
!ENDIF
!IF "$(ZLIB_CONFIG)" == "static-debug"
CFLAGS_DEPENDENCIES = $(CFLAGS_DEPENDENCIES) $(CFLAGS_ZLIB)
!ENDIF

# linker part

LFLAGS_ZLIB = /LIBPATH:"$(ZLIB_PATH)"
LFLAGS_STATIC_ZLIB =

!IF "$(ZLIB_CONFIG)" == "dynamic-release"
ZLIB_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_ZLIB) $(ZLIB_LIBS_DYNAMIC)$(ZLIB_SUFFIX).lib
!ENDIF
!IF "$(ZLIB_CONFIG)" == "dynamic-debug"
ZLIB_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_ZLIB) $(ZLIB_LIBS_DYNAMIC)$(ZLIB_SUFFIX).lib
!ENDIF
!IF "$(ZLIB_CONFIG)" == "static-release"
ZLIB_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_ZLIB) $(ZLIB_LIBS_STATIC)$(ZLIB_SUFFIX).lib
!ENDIF
!IF "$(ZLIB_CONFIG)" == "static-debug"
ZLIB_SUFFIX =
LFLAGS_DEPENDENCIES = $(LFLAGS_DEPENDENCIES) $(LFLAGS_ZLIB) $(ZLIB_LIBS_STATIC)$(ZLIB_SUFFIX).lib
!ENDIF

!ENDIF

# TARGETS SECTION
#################

# TARGET
# ===================================================================

# compiler part
# none

# linker part

LNK_OUT = /out:$(DIR_OUT)/$(TARGET)
LNK_OUT_IMP = /implib:$(DIR_OUT)/$(TARGET).lib

!IF "$(BUILD_CFG)" == "dynamic-release"
LFLAGS = $(LFLAGS) $(LNK_OUT).dll $(LNK_OUT_IMP)
!ENDIF
!IF "$(BUILD_CFG)" == "dynamic-debug"
LFLAGS = $(LFLAGS) $(LNK_OUT).dll $(LNK_OUT_IMP) /pdb:$(DIR_OUT)/$(TARGET).pdb
!ENDIF
!IF "$(BUILD_CFG)" == "static-release"
LFLAGS = $(LFLAGS) $(LNK_OUT).lib
!ENDIF
!IF "$(BUILD_CFG)" == "static-debug"
LFLAGS = $(LFLAGS) $(LNK_OUT).lib
!ENDIF

!IF "$(BUILD_CFG)" == "dynamic-release"
TARGET_SUFFIX = $(DEFUALT_DYNAMIC_RELEASE_SUFFIX)
!ENDIF
!IF "$(BUILD_CFG)" == "dynamic-debug"
TARGET_SUFFIX = $(DEFUALT_DYNAMIC_DEBUG_SUFFIX)
!ENDIF
!IF "$(BUILD_CFG)" == "static-release"
TARGET_SUFFIX = $(DEFUALT_STATIC_RELEASE_SUFFIX)
!ENDIF
!IF "$(BUILD_CFG)" == "static-debug"
TARGET_SUFFIX = $(DEFUALT_STATIC_DEBUG_SUFFIX)
!ENDIF

CC = $(COMPILER) $(CFLAGS) $(CFLAGS_STD) $(CFLAGS_DEPENDENCIES)
LNK = $(LINKER) $(LFLAGS) $(LFLAGS_DEPENDENCIES) $(LFLAGS_STD)

X_OBJS= \
        $(DIR_OBJ)\base64.obj \
        $(DIR_OBJ)\connect.obj \
        $(DIR_OBJ)\content_encoding.obj \
        $(DIR_OBJ)\cookie.obj \
        $(DIR_OBJ)\curl_addrinfo.obj \
        $(DIR_OBJ)\dict.obj \
        $(DIR_OBJ)\easy.obj \
        $(DIR_OBJ)\escape.obj \
        $(DIR_OBJ)\file.obj \
        $(DIR_OBJ)\formdata.obj \
        $(DIR_OBJ)\ftp.obj \
        $(DIR_OBJ)\getenv.obj \
        $(DIR_OBJ)\getinfo.obj \
        $(DIR_OBJ)\gtls.obj \
        $(DIR_OBJ)\hash.obj \
        $(DIR_OBJ)\hostares.obj \
        $(DIR_OBJ)\hostasyn.obj \
        $(DIR_OBJ)\hostip.obj \
        $(DIR_OBJ)\hostip4.obj \
        $(DIR_OBJ)\hostip6.obj \
        $(DIR_OBJ)\hostsyn.obj \
        $(DIR_OBJ)\hostthre.obj \
        $(DIR_OBJ)\http.obj \
        $(DIR_OBJ)\http_chunks.obj \
        $(DIR_OBJ)\http_digest.obj \
        $(DIR_OBJ)\http_negotiate.obj \
        $(DIR_OBJ)\http_ntlm.obj \
        $(DIR_OBJ)\if2ip.obj \
        $(DIR_OBJ)\inet_ntop.obj \
        $(DIR_OBJ)\inet_pton.obj \
        $(DIR_OBJ)\ldap.obj \
        $(DIR_OBJ)\llist.obj \
        $(DIR_OBJ)\md5.obj \
        $(DIR_OBJ)\memdebug.obj \
        $(DIR_OBJ)\mprintf.obj \
        $(DIR_OBJ)\multi.obj \
        $(DIR_OBJ)\netrc.obj \
        $(DIR_OBJ)\parsedate.obj \
        $(DIR_OBJ)\progress.obj \
        $(DIR_OBJ)\rawstr.obj \
        $(DIR_OBJ)\select.obj \
        $(DIR_OBJ)\sendf.obj \
        $(DIR_OBJ)\share.obj \
        $(DIR_OBJ)\socks.obj \
        $(DIR_OBJ)\speedcheck.obj \
        $(DIR_OBJ)\splay.obj \
        $(DIR_OBJ)\sslgen.obj \
        $(DIR_OBJ)\ssluse.obj \
        $(DIR_OBJ)\strequal.obj \
        $(DIR_OBJ)\strerror.obj \
        $(DIR_OBJ)\strtok.obj \
        $(DIR_OBJ)\strtoofft.obj \
        $(DIR_OBJ)\telnet.obj \
        $(DIR_OBJ)\tftp.obj \
        $(DIR_OBJ)\timeval.obj \
        $(DIR_OBJ)\transfer.obj \
        $(DIR_OBJ)\url.obj \
        $(DIR_OBJ)\version.obj \
# $(RESOURCE)

all : make_output_dir save_build_setup target

make_output_dir :
        @if not exist "$(DIR_OUT)" mkdir $(DIR_OUT)

save_build_setup :
        @echo $(BUILD_SETUP) > $(DIR_OUT)/$(DEFAULT_BUILD_SETUP_FILE)

target : make_object_dir $(X_OBJS)
        $(LNK) $(X_OBJS)

make_object_dir:
        @if not exist "$(DIR_OBJ)" mkdir $(DIR_OBJ)

.SUFFIXES: .c .obj .res

{.\}.c{$(DIR_OBJ)\}.obj:
        $(CC) /Fo"$@" $<
Received on 2009-02-24