* package/harbour-win.spec
* package/harbour-wce.spec
* config/global.mk
* INSTALL
* Renamed HB_BIN_COMPILE to HB_HOST_BIN
(old pending TODO)
* tests/flink.prg
+ Added comment.
+ Added example to dir symlink.
* contrib/hbpre.hbm
+ Added comments.
* config/beos/gcc.mk
* config/global.mk
* config/qnx/gcc.mk
* config/bsd/gcc.mk
* config/bsd/clang.mk
* config/bsd/pcc.mk
* config/wce/mingwarm.mk
* config/wce/poccarm.mk
* config/wce/msvcarm.mk
* config/vxworks/gcc.mk
* config/vxworks/diab.mk
* config/darwin/gcc.mk
* config/darwin/icc.mk
* config/darwin/clang.mk
* config/hpux/gcc.mk
* config/dos/watcom.mk
* config/dos/djgpp.mk
* config/c.mk
* config/win/xcc.mk
* config/win/mingw.mk
* config/win/pocc.mk
* config/win/bcc.mk
* config/win/watcom.mk
* config/win/icc.mk
* config/win/cygwin.mk
* config/win/msvc.mk
* config/linux/watcom.mk
* config/linux/gcc.mk
* config/linux/icc.mk
* config/linux/clang.mk
* config/linux/sunpro.mk
* config/rules.mk
* config/os2/watcom.mk
* config/os2/gcc.mk
* config/sunos/gcc.mk
* config/sunos/sunpro.mk
* Renamed HB_INC_COMPILE to HB_HOST_INC
(it's still not precise name, just in sync with HB_HOST_BIN.
In Harbour there is no difference between headers accross
the platforms, so they could just be called something more
neutral. If you have an idea, pls speak up.)
127 lines
3.6 KiB
Makefile
127 lines
3.6 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
# GNU Make file for Borland/CodeGear/Embarcadero C/C++ 32-bit (4.x-)
|
|
|
|
OBJ_EXT := .obj
|
|
LIB_PREF :=
|
|
LIB_EXT := .lib
|
|
|
|
HB_DYN_COPT := -DHB_DYNLIB
|
|
|
|
CC := bcc32.exe
|
|
CC_IN := -c
|
|
CC_OUT := -o
|
|
|
|
CFLAGS += -I. -I$(HB_HOST_INC)
|
|
|
|
CFLAGS += -q -tWM -CP437
|
|
|
|
ifneq ($(HB_BUILD_WARN),no)
|
|
CFLAGS += -w -Q -w-sig-
|
|
endif
|
|
|
|
ifneq ($(HB_BUILD_OPTIM),no)
|
|
# for some reason -6 generates the exact same code as -4 with both 5.5 and 5.8.
|
|
# -5 seems to be significantly slower than both. [vszakats]
|
|
CFLAGS += -d -6 -O2 -OS -Ov -Oi -Oc
|
|
endif
|
|
|
|
ifeq ($(HB_BUILD_MODE),cpp)
|
|
CFLAGS += -P
|
|
endif
|
|
|
|
ifeq ($(HB_BUILD_DEBUG),yes)
|
|
CFLAGS += -y -v
|
|
endif
|
|
|
|
ifneq ($(HB_HOST_PLAT_UNIX),)
|
|
BACKSLASH := $(subst /,\,\\)
|
|
else
|
|
BACKSLASH := $(subst /,\,\)
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),sh)
|
|
ECHOBACKSLASH := $(BACKSLASH)$(BACKSLASH)
|
|
else
|
|
ECHOBACKSLASH := $(BACKSLASH)
|
|
endif
|
|
|
|
# Hack to autoconfig bcc, and not require properly set .cfg files in its bin dir.
|
|
# It only works if we know compiler location.
|
|
ifneq ($(HB_COMP_PATH_PUB),)
|
|
HB_CFLAGS += $(subst /,$(BACKSLASH),-I"$(HB_COMP_PATH_PUB)../Include")
|
|
LDFLAGS += $(subst /,$(BACKSLASH),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK")
|
|
DFLAGS += $(subst /,$(BACKSLASH),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK")
|
|
endif
|
|
|
|
RC := brcc32.exe
|
|
RC_OUT := -fo
|
|
|
|
LD := ilink32.exe
|
|
LIBPATHS := $(subst /,$(BACKSLASH),-L"$(LIB_DIR)")
|
|
LDFLAGS += $(LIBPATHS) -Gn -Tpe
|
|
LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) c0x32.obj $(filter-out %$(RES_EXT),$(^F)), "$(subst /,$(BACKSLASH),$(BIN_DIR)/$@)", nul, $(LDLIBS) cw32mt import32,, $(filter %$(RES_EXT),$(^F)) $(LDSTRIP)
|
|
|
|
LDLIBS := $(strip $(HB_USER_LIBS) $(LIBS) $(SYSLIBS))
|
|
|
|
AR := tlib.exe
|
|
ARFLAGS += /P128
|
|
AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) "$(subst /,$(BACKSLASH),$(LIB_DIR)/$@)" $(foreach file,$(?F),-+$(file))
|
|
|
|
ifneq ($(HB_SHELL),sh)
|
|
ifeq ($(HB_SHELL_XP),)
|
|
|
|
ifeq ($(HB_SHELL),nt)
|
|
LINECONT := ^&
|
|
else
|
|
LINECONT := &
|
|
endif
|
|
|
|
# NOTE: Command-line limit length defeating methods found below
|
|
# are only needed to support pre-Windows XP systems, where
|
|
# limit is 2047 chars. [vszakats]
|
|
|
|
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
|
define library_object
|
|
@$(ECHO) $(ECHOQUOTE)-+$(subst /,$(ECHOBACKSLASH),$(file)) $(LINECONT)$(ECHOQUOTE) >> __lib__.tmp
|
|
|
|
endef
|
|
|
|
define create_library
|
|
$(if $(wildcard __lib__.tmp),@$(RM) __lib__.tmp,)
|
|
$(foreach file,$(?F),$(library_object))
|
|
@$(ECHO) $(ECHOQUOTE)-+$(ECHOQUOTE)>> __lib__.tmp
|
|
$(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) "$(subst /,$(BACKSLASH),$(LIB_DIR)/$@)" @__lib__.tmp
|
|
endef
|
|
|
|
AR_RULE = $(create_library)
|
|
|
|
endif
|
|
endif
|
|
|
|
DY := ilink32.exe
|
|
DFLAGS += -q -Gn -C -aa -Tpd -Gi -x
|
|
DY_OUT :=
|
|
# NOTE: .lib extension not added to keep line short enough to work on Win9x/ME
|
|
DLIBS := $(HB_USER_LIBS) $(LIBS) $(SYSLIBS) cw32mt import32
|
|
|
|
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
|
define dynlib_object
|
|
@$(ECHO) $(ECHOQUOTE)$(subst /,$(ECHOBACKSLASH),$(file)) +$(ECHOQUOTE) >> __dyn__.tmp
|
|
|
|
endef
|
|
define create_dynlib
|
|
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
|
|
$(foreach file,$^,$(dynlib_object))
|
|
@$(ECHO) $(ECHOQUOTE), $(subst /,$(ECHOBACKSLASH),$(DYN_DIR)/$@),, $(subst /,$(ECHOBACKSLASH),$(DLIBS))$(ECHOQUOTE) >> __dyn__.tmp
|
|
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) c0d32.obj @__dyn__.tmp
|
|
@$(CP) $(subst /,$(DIRSEP),$(DYN_DIR)/$(basename $@)$(LIB_EXT)) $(subst /,$(DIRSEP),$(IMP_FILE))
|
|
@$(RM) $(subst /,$(DIRSEP),$(DYN_DIR)/$(basename $@)$(LIB_EXT))
|
|
endef
|
|
|
|
DY_RULE = $(create_dynlib)
|
|
|
|
include $(TOP)$(ROOT)config/rules.mk
|