* utils/hbmk2/hbmk2.prg
+ Added support for source file parsing for headers in -inc mode.
.prg, .c and .rc files are currently parsed recursively,
include paths will be scanned for included files. There are
currently three levels of scanning: disabled, partial (default)
and full. Partial will scan the first 16K of each source file
for performance reasons, full will scan the complete files.
The source parser is currently very simple; '#include "<filename>"'
pattern is recognized anywhere in the processed source, no
other variations are supported ATM. Using this format is IMO
best practice for user programs, if someone needs more
than this, it needs to be developed, current method is quite
fast, which is important when dealing with lots of source
files.
+ Added option to control header scanning: -[no]head=<mode>
This is also supported in .hbp files.
+ Added support to look in current dir for libs for compilers
where this is supported.
+ Added cmdline option -resflag=, .hbp option resflags= and
overall support for user supplied resource compiler flags.
+ Added support for cyg*.dll style libs.
! Fixed to handle libs with explicit dirs for compilers
where this is supported.
* config/dos/owatcom.cf
* config/win/owatcom.cf
* config/linux/owatcom.cf
* config/os2/owatcom.cf
+ Added link to wlink options.
113 lines
2.5 KiB
CFEngine3
113 lines
2.5 KiB
CFEngine3
#
|
|
# $Id$
|
|
#
|
|
|
|
# GNU MAKE file for Open Watcom C/C++ compiler
|
|
|
|
# ---------------------------------------------------------------
|
|
# See option docs here:
|
|
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/cpopts.html
|
|
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlink.html
|
|
# ---------------------------------------------------------------
|
|
|
|
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
|
|
|
|
OBJ_EXT = .o
|
|
EXE_EXT =
|
|
LIB_PREF =
|
|
LIB_EXT = .lib
|
|
|
|
ifeq ($(HB_BUILD_MODE),c)
|
|
CC = wcc386
|
|
endif
|
|
ifeq ($(HB_BUILD_MODE),cpp)
|
|
CC = wpp386
|
|
endif
|
|
# Build in C++ mode by default
|
|
ifeq ($(HB_BUILD_MODE),)
|
|
CC = wpp386
|
|
endif
|
|
CC_IN =
|
|
CC_OUT = -fo=
|
|
|
|
CPPFLAGS = -zq -bt=linux
|
|
|
|
ifneq ($(HB_BUILD_WARN),no)
|
|
CPPFLAGS += -w3
|
|
endif
|
|
|
|
ifneq ($(HB_BUILD_OPTIM),no)
|
|
# architecture flags
|
|
CPPFLAGS += -6r -fp6
|
|
|
|
# optimization flags
|
|
# don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
|
|
# -oxaht
|
|
CPPFLAGS += -onaehtr -s -ei -zp4 -zt0
|
|
#CPPFLAGS += -obl+m
|
|
ifeq ($(CC),wpp386)
|
|
CPPFLAGS += -oi+
|
|
else
|
|
CPPFLAGS += -oi
|
|
endif
|
|
endif
|
|
|
|
|
|
CPPFLAGS += -i. -i$(TOP)$(ROOT)include
|
|
ifneq ($(HB_LIB_COMPILE),)
|
|
CPPFLAGS += -i$(HB_INC_COMPILE)
|
|
endif
|
|
|
|
ifeq ($(HB_BUILD_DEBUG),yes)
|
|
CPPFLAGS += -d2
|
|
endif
|
|
|
|
empty:=
|
|
space:= $(empty) $(empty)
|
|
comma:= ,
|
|
|
|
LD = wlink
|
|
LDFLAGS = sys Linux
|
|
ifeq ($(HB_BUILD_DEBUG),yes)
|
|
LDFLAGS := debug all $(LDFLAGS)
|
|
endif
|
|
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib))
|
|
LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib))
|
|
else
|
|
LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib))
|
|
LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib))
|
|
endif
|
|
|
|
# If LIBS specifies the rdd library, add all DB drivers.
|
|
ifeq ($(findstring rdd,$(LIBS)),rdd)
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv))
|
|
else
|
|
RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv))
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(findstring rtl,$(LIBS)),rtl)
|
|
ifeq ($(HB_LIB_COMPILE),)
|
|
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt))
|
|
else
|
|
GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt))
|
|
endif
|
|
endif
|
|
|
|
LDFILES = $(subst $(space),$(comma) ,$(^F))
|
|
LDLIBS = $(subst $(space),$(comma) ,$(strip $(LINKLIBS) $(RDDLIBS) $(GTLIBS)))
|
|
LD_RULE = $(LD) $(LDFLAGS) $(HB_USER_LDFLAGS) NAME $@ FILE $(LDFILES)
|
|
ifneq ($(LDLIBS),)
|
|
LD_RULE += LIB $(LDLIBS)
|
|
endif
|
|
|
|
AR = wlib
|
|
# ARFLAGS = -c -n -fa $(HB_USER_AFLAGS)
|
|
ARFLAGS = -c -n $(HB_USER_AFLAGS)
|
|
AR_RULE = $(AR) $(ARFLAGS) $(LIB_DIR)/$@ $(foreach file, $(^F), -+$(file))
|
|
|
|
include $(TOP)$(ROOT)config/rules.cf
|