Files
harbour-core/harbour/contrib/xhb/makefile.vc
Viktor Szakats d71fa590e7 2007-09-25 04:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/Makefile
   * contrib/xhb/xhbfunc.c
   + contrib/xhb/xhb.ch
   + contrib/xhb/xhbcomp.prg
     + Added xhb_AScan(), xhb_AIns(), xhb_ADel() plus defines 
       to redirect extended AScan(), AIns(), ADel() calls to these 
       functions. They need to be tested as I'm no xhb user.
     + Added compatibility header, which adds a the above translations 
       and include hbcompat.ch.
     + Added INIT PROC xhb_Init() as a future place for xhb specific 
       startup settings.
     ; TODO:
       - Add $ and [] operator overloading.
       - Add operator overloading for hash type.
       - Add a way hash API call to control the default flag 
         hb_hashNew() uses, then add this default setting to 
         the xhb libs INIT PROC.
     ; For better xhb compatibility, developers should add 
       #ifndef __XHARBOUR__
          #include "xhb.ch"
       #endif
       to every .prg file they use.

   + contrib/xhb/make_b32.bat
   + contrib/xhb/make_vc.bat
   + contrib/xhb/makefile.bc
   + contrib/xhb/makefile.vc
     + Added non-GNU makefiles for xhb lib.

   * include/hbcompat.ch
     + Added xhb compatibility translates for ENDSWITCH end friends.

   * source/rtl/scrollbr.prg
     * Minor formatting.
2007-09-25 02:43:22 +00:00

155 lines
4.0 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 $(PRG_USR) $(HARBOURFLAGS)
LDFLAGS = $(LDFLAGS)
#
# Macros to access our library names
#
TOOLS_LIB = $(LIB_DIR)\xhb.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)\hbxml.obj \
$(OBJ_DIR)\hbsyslog.obj \
$(OBJ_DIR)\hboutdbg.obj \
$(OBJ_DIR)\cstructc.obj \
$(OBJ_DIR)\xhbfunc.obj \
$(OBJ_DIR)\txml.obj \
$(OBJ_DIR)\hblog.obj \
$(OBJ_DIR)\hblognet.obj \
$(OBJ_DIR)\cstruct.obj \
$(OBJ_DIR)\xhbcomp.obj \
#
# Our default target
#
all: \
$(TOOLS_LIB)
CLEAN:
-@if exist $(OBJ_DIR)\hbxml.* del $(OBJ_DIR)\hbxml.*
-@if exist $(OBJ_DIR)\hbsyslog.* del $(OBJ_DIR)\hbsyslog.*
-@if exist $(OBJ_DIR)\hboutdbg.* del $(OBJ_DIR)\hboutdbg.*
-@if exist $(OBJ_DIR)\cstructc.* del $(OBJ_DIR)\cstructc.*
-@if exist $(OBJ_DIR)\xhbfunc.* del $(OBJ_DIR)\xhbfunc.*
-@if exist $(OBJ_DIR)\txml.* del $(OBJ_DIR)\txml.*
-@if exist $(OBJ_DIR)\hblog.* del $(OBJ_DIR)\hblog.*
-@if exist $(OBJ_DIR)\hblognet.* del $(OBJ_DIR)\hblognet.*
-@if exist $(OBJ_DIR)\cstruct.* del $(OBJ_DIR)\cstruct.*
-@if exist $(OBJ_DIR)\xhbcomp.* del $(OBJ_DIR)\xhbcomp.*
-@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)