Files
harbour-core/harbour/contrib/tip/makefile.vc
Viktor Szakats 799edeb1e5 2007-10-01 23:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/tip/Makefile
   * contrib/tip/makefile.bc
   + contrib/tip/makefile.vc
   + contrib/tip/make_vc.bat
   * contrib/tip/tip.ch
   * contrib/tip/utils.c
   * contrib/tip/base64x.c
   * contrib/tip/encmthd.c
   - contrib/tip/hbhex2n.c
   * contrib/tip/cgi.prg
   * contrib/tip/client.prg
   * contrib/tip/ftpcln.prg
   * contrib/tip/httpcln.prg
   * contrib/tip/mail.prg
   * contrib/tip/thtml.prg
   * contrib/tip/url.prg
     + Code converted to not require xhb lib.
     % Now compiled with -kM switch to avoid macro expansion 
       of strings. This is important here, as "&" char is used 
       quite often in the code, so expect a somewhat better 
       performance.
     - Removed hex number conversion functions, as compatible 
       versions are now available in Harbour with am hb_ prefix.
     + C code update to use Harbour API calls only.
     + Added VC build script.
     ! Fixed two C warnings.
     ! Standardized SVN header in one file.
     ! Set std SVN keywords and eol-style.
     ; Please test it.

   * include/hbextern.ch
   * source/rtl/hbinet.c
   * contrib/xhb/xhb.ch
   * contrib/xhb/xhbfunc.c
     * Renamed hb_IsInetSocket() to hb_inetIsSocket() to 
       keep all inet related functions in one namespace.
2007-10-01 22:17:21 +00:00

170 lines
4.6 KiB
Plaintext

#
# $Id$
#
#
# Makefile for Harbour Project for Microsoft Visual C (32 bits)
#
#
# NOTE: You can use these envvars to configure the make process:
# (note that these are all optional)
#
# CFLAGS - Extra C compiler options for libraries and for
# executables
# C_USR - Extra C compiler options for libraries and for
# executables (GNU make compatible envvar)
# CLIBFLAGS - Extra C compiler options for the libraries
# HARBOURFLAGS - Extra Harbour compiler options
# PRG_USR - Extra Harbour compiler options
# (GNU make compatible envvar)
#
#
# Notes about this makefile:
#
# 1. To add new files to a dependancy list, add an obj name to one of the
# OBJ lists for the appropriate library.
# NOTE: put .prg related obj's last in the lib list.
#
# 2. This is a recursive script. If you change the name of this file,
# be sure to change MK_FILE (a few lines down) to the new name as well.
#
# 3. Recurrsion rules are quite simple:
# If you specifiy /a on the command line, files in the obj\vc dir
# will be deleted, and when nmake recurses, it's without the /a flag
#
# If a .prg.obj rule is fired, nmake will execute this script with
# a specific target as a parameter immediatley after compiling a given
# set of prg files.
# ie: Harbour $<
# nmake /fmakefile.vc obj\vc\rtl.lib2
# which will simply get make to re-evaluate the dependancy list for the
# lib, and as a result, it will execute the C compiler using the .c.obj
# rule below to create the obj's for the prg's that were created just
# prior to the recurrsive call. Once the obj's are created, the
# recurrsion is complete.
# See additional notes under RTL.LIB below.
#
MK_FILE = makefile.vc
MK_FLAGS = $(MAKEFLAGS: =)
OBJ_DIR = ..\..\obj\vc
LIB_DIR = ..\..\lib\vc
BIN_DIR = ..\..\bin
#
# Directory macros. These should never have to change.
#
INCLUDE_DIR = ..\..\include
TOOLS_DIR = .
#
# C compiler definition and C flags. These should never have to change.
#
AS = masm
CFLAGS = -I$(INCLUDE_DIR) -TP -W3 -nologo $(C_USR) $(CFLAGS)
CLIBFLAGS = -c $(CFLAGS) $(CLIBFLAGS)
CLIBFLAGSDEBUG = -Zi $(CLIBFLAGS)
HARBOURFLAGS = -i$(INCLUDE_DIR) -n -q0 -w2 -es2 -gc0 -kM $(PRG_USR) $(HARBOURFLAGS)
LDFLAGS = $(LDFLAGS)
#
# Macros to access our library names
#
TOOLS_LIB = $(LIB_DIR)\tip.lib
HARBOUR_EXE = $(BIN_DIR)\harbour.exe
#
# Rules
#
.SUFFIXES: .prg .lib .c .obj .asm
# override builtin
.c.obj::
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
#
#
#
LIBLIST = \
$(TOOLS_LIB)
#
# TOOLS.LIB rules
#
{$(TOOLS_DIR)}.c{$(OBJ_DIR)}.obj::
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
{$(TOOLS_DIR)}.prg{$(OBJ_DIR)}.obj::
$(HARBOUR_EXE) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
$(MAKE) -nologo /$(MK_FLAGS) /f$(MK_FILE) $(TOOLS_LIB)2
TOOLS_LIB_OBJS = \
$(OBJ_DIR)\base64x.obj \
$(OBJ_DIR)\encmthd.obj \
$(OBJ_DIR)\utils.obj \
\
$(OBJ_DIR)\cgi.obj \
$(OBJ_DIR)\client.obj \
$(OBJ_DIR)\credent.obj \
$(OBJ_DIR)\encb64.obj \
$(OBJ_DIR)\encoder.obj \
$(OBJ_DIR)\encqp.obj \
$(OBJ_DIR)\encurl.obj \
$(OBJ_DIR)\ftpcln.obj \
$(OBJ_DIR)\httpcln.obj \
$(OBJ_DIR)\mail.obj \
$(OBJ_DIR)\popcln.obj \
$(OBJ_DIR)\smtpcln.obj \
$(OBJ_DIR)\thtml.obj \
$(OBJ_DIR)\url.obj \
#
# Our default target
#
all: \
$(TOOLS_LIB)
CLEAN:
-@if exist $(OBJ_DIR)\base64x.* del $(OBJ_DIR)\base64x.*
-@if exist $(OBJ_DIR)\encmthd.* del $(OBJ_DIR)\encmthd.*
-@if exist $(OBJ_DIR)\utils.* del $(OBJ_DIR)\utils.*
-@if exist $(OBJ_DIR)\cgi.* del $(OBJ_DIR)\cgi.*
-@if exist $(OBJ_DIR)\client.* del $(OBJ_DIR)\client.*
-@if exist $(OBJ_DIR)\credent.* del $(OBJ_DIR)\credent.*
-@if exist $(OBJ_DIR)\encb64.* del $(OBJ_DIR)\encb64.*
-@if exist $(OBJ_DIR)\encoder.* del $(OBJ_DIR)\encoder.*
-@if exist $(OBJ_DIR)\encqp.* del $(OBJ_DIR)\encqp.*
-@if exist $(OBJ_DIR)\encurl.* del $(OBJ_DIR)\encurl.*
-@if exist $(OBJ_DIR)\ftpcln.* del $(OBJ_DIR)\ftpcln.*
-@if exist $(OBJ_DIR)\httpcln.* del $(OBJ_DIR)\httpcln.*
-@if exist $(OBJ_DIR)\mail.* del $(OBJ_DIR)\mail.*
-@if exist $(OBJ_DIR)\popcln.* del $(OBJ_DIR)\popcln.*
-@if exist $(OBJ_DIR)\smtpcln.* del $(OBJ_DIR)\smtpcln.*
-@if exist $(OBJ_DIR)\thtml.* del $(OBJ_DIR)\thtml.*
-@if exist $(OBJ_DIR)\url.* del $(OBJ_DIR)\url.*
-@if exist $(TOOLS_LIB) del $(TOOLS_LIB)
#
# Library dependencies and build rules
#
$(TOOLS_LIB) : $(TOOLS_LIB_OBJS)
lib /out:$@ $**
# dummy targets used for prg to c creation
$(TOOLS_LIB)2 : $(TOOLS_LIB_OBJS)