Files
harbour-core/harbour/contrib/mtpl_b32.mak
Viktor Szakats a341b29acd 2009-02-06 23:47 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* common.mak
  * harbour-wce-spec
  * harbour-win-spec
  * harbour.spec
  * make_b32.bat
  * make_b32.mak
  * make_gcc.mak
  * make_gcc.sh
  * make_gnu.bat
  * make_gnu.sh
  * make_gnu_os2.cmd
  * make_gnu_xmingw.sh
  * make_gnu_xmingwce.sh
  * make_vc.bat
  * make_vc.mak
  * mpkg_tgz.sh
  * bin/hb-func.sh
  * bin/hb-mkslib.sh
  * bin/hbmk.bat
  * bin/hbmk_os2.cmd
  * bin/postinst.sh
  * config/bin.cf
  * config/bsd/gcc.cf
  * config/darwin/gcc.cf
  * config/dos/bcc16.cf
  * config/dos/djgpp.cf
  * config/dos/owatcom.cf
  * config/dos/rsx32.cf
  * config/hpux/gcc.cf
  * config/lib.cf
  * config/linux/gcc.cf
  * config/linux/owatcom.cf
  * config/os2/gcc.cf
  * config/os2/icc.cf
  * config/rules.cf
  * config/sunos/gcc.cf
  * config/win/bcc32.cf
  * config/win/dm.cf
  * config/win/gcc.cf
  * config/win/icc.cf
  * config/win/mingw.cf
  * config/win/mingwce.cf
  * config/win/msvc.cf
  * config/win/msvcce.cf
  * config/win/owatcom.cf
  * config/win/pocc.cf
  * config/win/pocc64.cf
  * config/win/poccce.cf
  * config/win/rsxnt.cf
  * config/win/xcc.cf
  * contrib/gtalleg/Makefile
  * contrib/hbapollo/Makefile
  * contrib/hbcurl/Makefile
  * contrib/hbfbird/Makefile
  * contrib/hbfimage/Makefile
  * contrib/hbgd/Makefile
  * contrib/hbgd/tests/hbmk_b32.bat
  * contrib/hbgd/tests/hbmk_vc.bat
  * contrib/hbgf/hbgfgtk/Makefile
  * contrib/hbhpdf/Makefile
  * contrib/hbmysql/Makefile
  * contrib/hbodbc/Makefile
  * contrib/hbpgsql/Makefile
  * contrib/hbssl/Makefile
  * contrib/hbtip/ChangeLog
  * contrib/hbwhat/Makefile
  * contrib/hbwhat/tests/hbmk_b32.bat
  * contrib/hbwhat/tests/hbmk_vc.bat
  * contrib/mtpl_b32.bat
  * contrib/mtpl_b32.mak
  * contrib/mtpl_gcc.mak
  * contrib/mtpl_gcc.sh
  * contrib/mtpl_vc.bat
  * contrib/mtpl_vc.mak
  * contrib/rddads/Makefile
  * contrib/rddsql/sddfb/Makefile
  * contrib/rddsql/sddmy/Makefile
  * contrib/rddsql/sddpg/Makefile
  * doc/es/tracing.txt
  * doc/gmake.txt
  * doc/tracing.txt
  * include/hbapi.h
  * source/main/harbour.c
  * source/pp/hbpp.c
  * source/rdd/dbffpt/Makefile
  * source/vm/cmdarg.c
  * source/vm/Makefile
  * source/vm/vmmt/Makefile
  * tests/multifnc/Makefile
  * tests/testid.prg
  * utils/hbdoc/Makefile
  * utils/hbi18n/Makefile
  * utils/hbmake/hbmake.prg
  * utils/hbmake/Makefile
  * utils/hbrun/Makefile
  * utils/hbtest/Makefile
    * Renamed remaining build configration envvars:
      - PRG_USR -> HB_USER_PRGFLAGS
      - C_USR   -> HB_USER_CFLAGS
      - L_USR   -> HB_USER_LDFLAGS
      - A_USR   -> HB_USER_AFLAGS
      - MK_USR  -> HB_USER_MAKEFLAGS
      (finally settled with HB_USER* instead of HB_USR*,
      this also means that HB_USER_LIBS was kept unchanged.)
    ; Please update your environment.
      You may use these commands to make it easy:
      gsar -o -sPRG_USR -rHB_USER_PRGFLAGS  *
      gsar -o -sC_USR   -rHB_USER_CFLAGS    *
      gsar -o -sL_USR   -rHB_USER_LDFLAGS   *
      gsar -o -sA_USR   -rHB_USER_AFLAGS    *
      gsar -o -sMK_USR  -rHB_USER_MAKEFLAGS *
2009-02-06 23:15:37 +00:00

246 lines
7.4 KiB
Makefile

#
# $Id$
#
# --------------------------------------------------------
# Makefile common section for Harbour Project Contrib libs
# for Borland C/C++
# --------------------------------------------------------
# ---------------------------------------------------------------
# Copyright 2007 Marek Paliwoda (mpaliwoda "at" interia "dot" pl)
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
# NOTE: You can use these optional envvars to configure the make process:
#
# HB_USER_CFLAGS - Extra C compiler options for libraries
# HB_USER_PRGFLAGS - Extra Harbour compiler options
#
.AUTODEPEND
.SUFFIXES:
#**********************************************************
HB_ARCHITECTURE = win
#**********************************************************
!ifndef HB_ROOT
HB_ROOT = ..\..
!endif
#**********************************************************
!ifndef ECHO
ECHO = echo.
!endif
!ifndef DEL
DEL = del
!endif
#**********************************************************
# binary file suffixes and prefixes
#**********************************************************
!ifndef OBJEXT
OBJEXT = .obj
!endif
!ifndef LIBEXT
LIBEXT = .lib
!endif
#**********************************************************
.SUFFIXES: $(LIBEXT) $(OBJEXT) .prg .c .cpp .asm
#**********************************************************
# Install directory defaults.
#**********************************************************
!ifndef HB_INSTALL_PREFIX
HB_INSTALL_PREFIX = $(HB_ROOT)
!endif
!ifndef HB_BIN_INSTALL
HB_BIN_INSTALL = $(HB_INSTALL_PREFIX)\bin
!endif
!ifndef HB_INC_INSTALL
HB_INC_INSTALL = $(HB_INSTALL_PREFIX)\include
!endif
!ifndef HB_LIB_INSTALL
HB_LIB_INSTALL = $(HB_INSTALL_PREFIX)\lib
!endif
#**********************************************************
# Directory macros. These should never have to change.
#**********************************************************
!ifndef HB_CC_DIRNAME
HB_CC_DIRNAME = $(_HB_CC_NAME)
!endif
OBJ_DIR = obj\$(HB_CC_DIRNAME)\\
LIB_DIR = $(HB_ROOT)\lib\$(HB_CC_DIRNAME)\\
BIN_DIR = $(HB_ROOT)\bin\$(HB_CC_DIRNAME)\\
INCLUDE_DIR = $(HB_ROOT)\include
#**********************************************************
# Macros to access Harbour executable and other goodies
#**********************************************************
!ifndef HB
HB = $(BIN_DIR)harbour.exe
!endif
#**********************************************************
# C compiler definition and C flags. These should never have to change.
#**********************************************************
CC = bcc32.exe
LINKER = ilink32.exe
MKLIB = tlib.exe
#**********************************************************
CFLAGS = -I$(INCLUDE_DIR) $(HB_USER_CFLAGS) $(CFLAGS)
#-----------
!if "$(HB_BUILD_DEBUG)" == "yes"
CFLAGS = -y -v $(CFLAGS)
!endif
#-----------
!if "$(HB_BUILD_OPTIM)" != "no"
CFLAGS = -4 -O2 -OS -Ov -Oi -Oc $(CFLAGS)
!endif
#-----------
#**********************************************************
CLIBFLAGS = -c -q -d -Q -w -w-sig- $(CFLAGS) $(CLIBFLAGS)
HARBOURFLAGS = -i$(INCLUDE_DIR) -n -q0 -w3 -es2 -km -l $(HB_USER_PRGFLAGS) $(HARBOURFLAGS)
!if "$(HB_BUILD_DEBUG)" == "yes"
HARBOURFLAGS = $(HARBOURFLAGS) -l-
!endif
LDFLAGS = $(LDFLAGS) $(HB_USER_LDFLAGS)
#**********************************************************
# This is needed, otherwise the libs may overflow when
# debug info is requested with -v -y
ARFLAGS = /P64 $(HB_USER_AFLAGS)
#**********************************************************
# COMPILE Rules
#**********************************************************
ALL_LIB_SRC_DIRS_TMP=\
.;\
$(OBJ_DIR);\
all: $(OBJ_DIR) $(LIB_PATH)
$(OBJ_DIR):
@if not exist $@\nul mkdir $@
#**********************************************************
# General *.c --> *.obj COMPILE rule for STATIC Libraries
{$(ALL_LIB_SRC_DIRS)}.c{$(OBJ_DIR)}$(OBJEXT):
$(CC) $(CLIBFLAGS) -o$@ $<
#**********************************************************
# General *.cpp --> *.obj COMPILE rule for STATIC Libraries
{$(ALL_LIB_SRC_DIRS)}.cpp{$(OBJ_DIR)}$(OBJEXT):
$(CC) $(CLIBFLAGS: -P= ) -P -o$@ $<
#**********************************************************
# General *.prg --> *.obj COMPILE rule for STATIC Libraries
{$(ALL_LIB_SRC_DIRS)}.prg{$(OBJ_DIR)}$(OBJEXT):
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $**
$(CC) $(CLIBFLAGS) -o$@ $(OBJ_DIR)\$&.c
#**********************************************************
!include common.mak
ALL_HEADERS = $(PRG_HEADERS) $(C_HEADERS)
#**********************************************************
$(LIB_PATH) : $(LIB_OBJS)
@if exist "$(LIB_PATH)" $(DEL) "$(LIB_PATH)" > NUL
$(MKLIB) "$(LIB_PATH)" $(ARFLAGS) @&&!
+$(**: = &^
+)
!
#**********************************************************
# CLEAN rule(s)
#**********************************************************
clean: doClean
Clean: doClean
CLEAN: doClean
doClean:
-if exist $(LIB_PATH) $(DEL) $(LIB_PATH) > nul
-$(ECHO) @echo off > _hbdeloo.bat
-$(ECHO) if %1x == x goto SKIP >> _hbdeloo.bat
-$(ECHO) if exist %1.c $(DEL) %1.c >> _hbdeloo.bat
-$(ECHO) if exist %1.obj $(DEL) %1.obj >> _hbdeloo.bat
-$(ECHO) :SKIP >> _hbdeloo.bat
-type &&!
@call _hbdeloo.bat $(LIB_OBJS:.obj=^
@call _hbdeloo.bat )
! > _hbdeloa.bat
-_hbdeloa.bat
-if exist _hbdeloa.bat $(DEL) _hbdeloa.bat > nul
-if exist _hbdeloo.bat $(DEL) _hbdeloo.bat > nul
-if exist "$(OBJ_DIR)" rd "$(OBJ_DIR)" > nul 2> nul
!if "$(HB_INSTALL_PREFIX)" == "$(HB_ROOT)"
-if exist $(HB_LIB_INSTALL)\$(LIBNAME)$(LIBEXT) $(DEL) $(HB_LIB_INSTALL)\$(LIBNAME)$(LIBEXT) > nul
!endif
-$(ECHO) @echo off > _hbdelho.bat
-$(ECHO) if %1x == x goto SKIP >> _hbdelho.bat
-$(ECHO) if $(HB_INSTALL_PREFIX)x == $(HB_ROOT)x goto SKIP >> _hbdelho.bat
-$(ECHO) if exist $(HB_INC_INSTALL)\%1 $(DEL) $(HB_INC_INSTALL)\%1 >> _hbdelho.bat
-$(ECHO) :SKIP >> _hbdelho.bat
-type &&!
@call _hbdelho.bat $(ALL_HEADERS: =^
@call _hbdelho.bat )
! > _hbdelha.bat
-_hbdelha.bat
-if exist _hbdelha.bat $(DEL) _hbdelha.bat > nul
-if exist _hbdelho.bat $(DEL) _hbdelho.bat > nul
#**********************************************************
# INSTALL rule(s)
#**********************************************************
install: doInstall
Install: doInstall
INSTALL: doInstall
doInstall:
-type &&!
@echo off
if not exist $(LIB_PATH) goto SKIP
if exist $(HB_LIB_INSTALL)\$(LIBNAME)$(LIBEXT) $(DEL) $(HB_LIB_INSTALL)\$(LIBNAME)$(LIBEXT) > nul
copy $(LIB_PATH) $(HB_LIB_INSTALL) > nul
:SKIP
! > _hbcpyla.bat
-_hbcpyla.bat
-if exist _hbcpyla.bat $(DEL) _hbcpyla.bat > nul
-$(ECHO) @echo off > _hbcpyho.bat
-$(ECHO) if %1x == x goto SKIP >> _hbcpyho.bat
-$(ECHO) if exist $(HB_INC_INSTALL)\%1 $(DEL) $(HB_INC_INSTALL)\%1 >> _hbcpyho.bat
-$(ECHO) if exist %1 copy %1 $(HB_INC_INSTALL) >> _hbcpyho.bat
-$(ECHO) :SKIP >> _hbcpyho.bat
-type &&!
@call _hbcpyho.bat $(ALL_HEADERS: =^
@call _hbcpyho.bat )
! > _hbcpyha.bat
-_hbcpyha.bat
-if exist _hbcpyha.bat $(DEL) _hbcpyha.bat > nul
-if exist _hbcpyho.bat $(DEL) _hbcpyho.bat > nul
#**********************************************************