* config/beos/gcc.mk
* config/bsd/gcc.mk
* config/wce/mingwarm.mk
* config/wce/poccarm.mk
* config/wce/msvcarm.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/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/pocc64.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/os2/watcom.mk
* config/os2/gcc.mk
* config/sunos/gcc.mk
* config/sunos/sunpro.mk
+ Uniformly using CFLAGS to store C compilation flags, instead
of a previous mixture of CPPFLAGS and CFLAGS.
* config/rules.mk
- Deleted CPPFLAGS.
* INSTALL
* bin/postinst.bat
! Minor fixes in texts.
92 lines
2.0 KiB
Makefile
92 lines
2.0 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
OBJ_EXT := .obj
|
|
LIB_PREF :=
|
|
LIB_EXT := .lib
|
|
|
|
ifeq ($(HB_CPU),x86)
|
|
# Always compile in -UNICODE mode for MSVC 9.0 and upper
|
|
# This version doesn't support Win9x anyway. [vszakats]
|
|
ifeq ($(filter $(HB_COMPILER_VER),600 700 710 800),)
|
|
HB_CFLAGS += -DUNICODE
|
|
endif
|
|
endif
|
|
|
|
HB_DYN_COPT := -DHB_DYNLIB
|
|
|
|
CC := cl.exe
|
|
CC_IN := -c
|
|
CC_OUT := -Fo
|
|
|
|
CFLAGS := -nologo -I. -I$(HB_INC_COMPILE) -Gs
|
|
LDFLAGS :=
|
|
|
|
ifeq ($(HB_BUILD_MODE),c)
|
|
CFLAGS += -TC
|
|
endif
|
|
ifeq ($(HB_BUILD_MODE),cpp)
|
|
CFLAGS += -TP
|
|
endif
|
|
# Build in C++ mode by default
|
|
ifeq ($(HB_BUILD_MODE),)
|
|
CFLAGS += -TP
|
|
endif
|
|
|
|
ifneq ($(HB_BUILD_WARN),no)
|
|
CFLAGS += -W4 -wd4127
|
|
endif
|
|
|
|
ifneq ($(HB_BUILD_OPTIM),no)
|
|
ifneq ($(filter $(HB_COMPILER_VER),600 700 710),)
|
|
CFLAGS += -Ogt2yb1p -GX- -G6 -YX
|
|
else
|
|
CFLAGS += -Ot2b1 -EHs-c-
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(HB_BUILD_DEBUG),yes)
|
|
CFLAGS += -MTd -Zi
|
|
else
|
|
CFLAGS += -MT
|
|
endif
|
|
|
|
# # NOTE: -GA flag should be disabled when building MT _.dlls_,
|
|
# # as it creates bad code according to MS docs [vszakats].
|
|
# ifneq ($(filter $(HB_COMPILER_VER),600),)
|
|
# CFLAGS += -GA
|
|
# endif
|
|
|
|
LD := link.exe
|
|
LD_OUT := -out:
|
|
|
|
LIBPATHS := -libpath:$(LIB_DIR)
|
|
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
|
|
|
|
LDFLAGS += -nologo $(LIBPATHS)
|
|
|
|
AR := lib.exe
|
|
ARFLAGS :=
|
|
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@
|
|
|
|
DY := $(LD)
|
|
DFLAGS := -nologo -dll -subsystem:console $(LIBPATHS)
|
|
DY_OUT := $(LD_OUT)
|
|
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
|
|
|
|
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
|
define dyn_object
|
|
@$(ECHO) $(ECHOQUOTE)$(file)$(ECHOQUOTE) >> __dyn__.tmp
|
|
|
|
endef
|
|
define create_dynlib
|
|
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
|
|
$(foreach file,$^,$(dyn_object))
|
|
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)"$(subst /,$(DIRSEP),$(DYN_DIR)/$@)" -implib:"$(IMP_FILE)" @__dyn__.tmp $(DLIBS)
|
|
endef
|
|
|
|
DY_RULE = $(create_dynlib)
|
|
|
|
include $(TOP)$(ROOT)config/rules.mk
|