* config/rules.cf
* config/win/global.cf
* config/lib.cf
* config/bin.cf
* Make files changed to:
- add Harbour option -n1 for all lib .prgs.
- add Harbour option -n for all binary .prgs.
- use HB_GCMODE to override -gc mode for binaries.
- add C -DHB_DYNLIB option when HB_DLL envvar is set to 'yes'.
; This means that now 'set HB_DLL=yes' setting works as planned,
and will compile Harbour to allow the creation of .dlls
and will also create those (msvc, bcc32, owatcom).
(MinGW has been covered before these changes already.)
; TOFIX: .dlls still need tweaking to work properly.
owatcom doesn't create usable binaries when
using HB_DLL=yes f.e., also hbrun-dll cannot be
built with msvc/bcc32.
* config/win/owatcom.cf
% Removed DOS hack.
* bin/hb-mkdyn.bat
! Fixes to recent changes.
108 lines
2.2 KiB
CFEngine3
108 lines
2.2 KiB
CFEngine3
#
|
|
# $Id$
|
|
#
|
|
|
|
all : first
|
|
|
|
HB_GT_LIST=\
|
|
gtcgi \
|
|
gtpca \
|
|
gtstd \
|
|
gtwin \
|
|
gtwvt \
|
|
gtgui \
|
|
|
|
# gtcrs \
|
|
# gtsln \
|
|
|
|
# verify if GT drivers exist
|
|
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
|
|
|
|
ifeq ($(HB_DLL),yes)
|
|
HB_CDYNLIB=-DHB_DYNLIB
|
|
endif
|
|
|
|
ifeq ($(SHLVL),) # COMMAND.COM
|
|
|
|
# There is a conflict with the use of '\' and '/' characters
|
|
# The MAKE requires '/' in filenames (ARCH_DIR) however some compilers
|
|
# and some DOS commands require '\' (ARCH_DOS)
|
|
ARCH_DIR = $(subst \,/,$(HB_ARCH))
|
|
ARCH_DOS = $(subst /,\,$(HB_ARCH))
|
|
LIB_DIR_DOS = $(subst /,\,$(LIB_DIR))
|
|
LIB_PATH_DOS = $(subst /,\,$(LIB_PATH))
|
|
LIB_ARCH_DOS = $(subst /,\,$(LIB_ARCH))
|
|
DIRSEP = $(subst /,\,\)
|
|
|
|
MK := $(subst \,/,$(subst \~,~,$(MAKE)))
|
|
|
|
ifeq ($(COMSPEC),) #location of command.com
|
|
ifeq ($(OS),Windows_NT)
|
|
COMSPEC := cmd.exe
|
|
else
|
|
COMSPEC := command.com
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(findstring cmd.exe,$(COMSPEC)),cmd.exe)
|
|
CMD_EXE := yes
|
|
else
|
|
CMD_EXE := no
|
|
endif
|
|
|
|
RM = del
|
|
RD = rmdir
|
|
MD = md
|
|
CP = $(COMSPEC) /C copy
|
|
MV = move
|
|
|
|
ifeq ($(CMD_EXE),yes)
|
|
|
|
RM = del /q /f
|
|
RD = rmdir /q /s
|
|
|
|
dirbase::
|
|
-@$(COMSPEC) /c \
|
|
for %d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %d\. $(MD) %d
|
|
$(if $(LIB_PATH_DOS),-@$(COMSPEC) /c \
|
|
for %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\. $(MD) %d,)
|
|
|
|
clean::
|
|
-@$(COMSPEC) /c \
|
|
if exist $(ARCH_DOS) $(RD) $(ARCH_DOS)
|
|
$(if $(LIB_ARCH_DOS),-@$(COMSPEC) /c if exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),)
|
|
|
|
else # command.com
|
|
|
|
dirbase::
|
|
-@for %%d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %%d\nul $(MD) %%d
|
|
$(if $(LIB_PATH_DOS),-@for %%d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %%d\nul $(MD) %%d,)
|
|
|
|
clean::
|
|
-@for %%f in ($(ARCH_DOS)\*.* *.bak *.obj *.o *.tds) do $(RM) %%f
|
|
-@for %%d in ($(ARCH_DOS) $(HB_ARCHITECTURE)) do if exist %%d\nul $(RD) %%d
|
|
$(if $(LIB_ARCH_DOS),-@if exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),)
|
|
|
|
endif
|
|
|
|
else # bash
|
|
|
|
ARCH_DIR = $(HB_ARCH)
|
|
MK = $(MAKE)
|
|
|
|
RM = rm -f
|
|
RD = rm -f -r
|
|
CP = cp -f
|
|
MV = mv -f
|
|
MD = mkdir
|
|
MDP = mkdir -p
|
|
|
|
dirbase::
|
|
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
|
|
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
|
|
|
|
clean::
|
|
-$(RD) $(ARCH_DIR) $(LIB_ARCH)
|
|
|
|
endif
|