Skip to content

Commit

Permalink
Reworked make for debug builds (Windows only).
Browse files Browse the repository at this point in the history
  • Loading branch information
ciyam committed May 3, 2012
1 parent 4bcadaa commit 4efd286
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README
Expand Up @@ -12,6 +12,9 @@ WEBDIR Web Document Root path** /srv/www/htdocs

Environment variables LIB and INCLUDE for VC++ will require additions for MySQL and (if used) OpenSSL.

If wanting to perform a debug build for Windows use the environment variable CPPDBG.
(e.g. for VC++ set CPPDBG=DEBUG=1)

The following are platform specific instructions for installing 3rd party libraries:

NOTE: To make things easier for Windows developers some .lib and .dll files have been included.
Expand Down
4 changes: 2 additions & 2 deletions make.bat
Expand Up @@ -7,13 +7,13 @@ if '%CPPENV%' == 'MVC' goto mvc
goto error1

:bcb
make.exe -fmakefile.bcb %* | findstr /V "MAKE Version"
make.exe -fmakefile.bcb %CPPDBG% %* | findstr /V "MAKE Version"
goto end

:mvc
if not exist gendeps.exe call cl.bat gendeps.cpp
nmake.exe /nologo /f makefile.mvc NO_INC_FILES=1 touch_incs
nmake.exe /nologo /f makefile.mvc %*
nmake.exe /nologo /f makefile.mvc %CPPDBG% %*
goto end

:error1
Expand Down
23 changes: 21 additions & 2 deletions makefile.bcb
@@ -1,6 +1,6 @@
##
## Usage:
## make [-DDEBUG] [-DCODEGUARD] [<target1> [<target2>] [...]]
## make [<target1> [<target2>] [...]]
##
## where:
## <target> is: to:
Expand All @@ -14,6 +14,7 @@
## ciyam_base make ciyam_base.dll target
## Meta make Meta.dll target
## bundle make bundle.exe target
## check_source make check_source.exe target
## ciyam_client make ciyam_client.exe target
## ciyam_interface make ciyam_interface.exe target
## ciyam_server make ciyam_server.exe target
Expand Down Expand Up @@ -202,6 +203,7 @@ TARGET_BASE_OBJECTS=base64.obj\
ptypes.obj\
read_write_buffer.obj\
read_write_buffered_stream.obj\
regex.obj\
sio.obj\
sha1.obj\
smtp.obj\
Expand All @@ -215,7 +217,8 @@ TARGET_BASE_ERRFILE=base.err

TARGET_COMMANDS=commands.lib
TARGET_COMMANDS_OBJECTS=command_parser.obj\
utilities.obj
utilities.obj\
regex.obj
TARGET_COMMANDS_ERRFILE=commands.err

TARGET_CIYAM_BASE=ciyam_base.dll
Expand Down Expand Up @@ -316,6 +319,9 @@ TARGET_META_ERRFILE=Meta.err
TARGET_BUNDLE=bundle.exe
TARGET_BUNDLE_OBJECTS=bundle.obj

TARGET_CHECK_SOURCE=check_source.exe
TARGET_CHECK_SOURCE_OBJECTS=check_source.obj

TARGET_CIYAM_CLIENT=ciyam_client.exe
TARGET_CIYAM_CLIENT_OBJECTS=ciyam_client.obj

Expand Down Expand Up @@ -406,6 +412,7 @@ ALL_TARGETS=\
$(TARGET_CIYAM_BASE)\
$(TARGET_META)\
$(TARGET_BUNDLE)\
$(TARGET_CHECK_SOURCE)\
$(TARGET_CIYAM_CLIENT)\
$(TARGET_CIYAM_INTERFACE)\
$(TARGET_CIYAM_SERVER)\
Expand Down Expand Up @@ -439,6 +446,7 @@ ALL_OBJECTS=\
$(TARGET_CIYAM_BASE_OBJECTS)\
$(TARGET_META_OBJECTS)\
$(TARGET_BUNDLE_OBJECTS)\
$(TARGET_CHECK_SOURCE_OBJECTS)\
$(TARGET_CIYAM_CLIENT_OBJECTS)\
$(TARGET_CIYAM_INTERFACE_OBJECTS)\
$(TARGET_CIYAM_SERVER_OBJECTS)\
Expand Down Expand Up @@ -481,6 +489,7 @@ commands: $(TARGET_COMMANDS)
ciyam_base: $(TARGET_CIYAM_BASE)
Meta: $(TARGET_META)
bundle: $(TARGET_BUNDLE)
check_source: $(TARGET_CHECK_SOURCE)
ciyam_client: $(TARGET_CIYAM_CLIENT)
ciyam_interface: $(TARGET_CIYAM_INTERFACE)
ciyam_server: $(TARGET_CIYAM_SERVER)
Expand Down Expand Up @@ -572,6 +581,16 @@ $(TARGET_BUNDLE):: $(TARGET_BUNDLE_OBJECTS) $(TARGET_BASE)
$(LINK_NORMAL) $(ZLIB_LIBS)
!

$(TARGET_CHECK_SOURCE:.exe=.compile):
@echo $(CPP_NORMAL) %* >compile.bat

$(TARGET_CHECK_SOURCE):: $(TARGET_CHECK_SOURCE:.exe=.compile)

$(TARGET_CHECK_SOURCE):: $(TARGET_CHECK_SOURCE_OBJECTS)
$(LINK) @&&!
$(LINK_NORMAL)
!

$(TARGET_CIYAM_CLIENT:.exe=.compile):
@echo $(CPP_NORMAL) %* >compile.bat

Expand Down
2 changes: 1 addition & 1 deletion makefile.bcb.xrep
@@ -1,7 +1,7 @@
`{`#makefile.vars.xrep @`}
##
## Usage:
## make [-DDEBUG] [-DCODEGUARD] [<target1> [<target2>] [...]]
## make [<target1> [<target2>] [...]]
##
## where:
## <target> is: to:
Expand Down
2 changes: 1 addition & 1 deletion makefile.mvc
@@ -1,6 +1,6 @@
##
## Usage:
## make [DEBUG=1] [<target1> [<target2>] [...]]
## make [<target1> [<target2>] [...]]
##
## where:
## <target> is: to:
Expand Down
2 changes: 1 addition & 1 deletion makefile.mvc.xrep
@@ -1,7 +1,7 @@
`{`#makefile.vars.xrep @`}
##
## Usage:
## make [DEBUG=1] [<target1> [<target2>] [...]]
## make [<target1> [<target2>] [...]]
##
## where:
## <target> is: to:
Expand Down

0 comments on commit 4efd286

Please sign in to comment.