From aac58d19f7543e9f322ebb70f0f98cd7c4eefed7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 12 Aug 2008 18:55:25 +0000 Subject: [PATCH] 2008-08-12 19:31 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + config/w32/dm.cf + Digital Mars .cf file added. Some cleanups done, and TOFIX added besides the following: ; TOFIX: This file comes from xhb, and it needs to be updated to create core and contrib .lib files in central dir. Until then it doesn't work. Ryszard, if you see this, could you take a look? * config/dos/djgpp.cf * config/w32/bcc32.cf * config/w32/xcc.cf % Unnecessary CPPFLAGS -I options deleted: -I$(TOP) -I$(TOP)include -Iinclude -I$(TOP)$(ROOT) ; NOTE/TODO: CPPFLAGS -i usage should be cleaned for these files: config/dos/owatcom.cf config/linux/owatcom.cf config/os2/gcc.cf config/w32/owatcom.cf config/w32/watcom.cf --- harbour/ChangeLog | 25 ++++++++++ harbour/config/dos/djgpp.cf | 5 +- harbour/config/w32/bcc32.cf | 6 +-- harbour/config/w32/dm.cf | 98 +++++++++++++++++++++++++++++++++++++ harbour/config/w32/xcc.cf | 6 +-- 5 files changed, 126 insertions(+), 14 deletions(-) create mode 100644 harbour/config/w32/dm.cf diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3f565df41c..7a8de934d5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,31 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-12 19:31 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + + config/w32/dm.cf + + Digital Mars .cf file added. Some cleanups done, and + TOFIX added besides the following: + ; TOFIX: This file comes from xhb, and it needs to be updated + to create core and contrib .lib files in central dir. + Until then it doesn't work. Ryszard, if you see + this, could you take a look? + + * config/dos/djgpp.cf + * config/w32/bcc32.cf + * config/w32/xcc.cf + % Unnecessary CPPFLAGS -I options deleted: + -I$(TOP) + -I$(TOP)include + -Iinclude + -I$(TOP)$(ROOT) + + ; NOTE/TODO: CPPFLAGS -i usage should be cleaned for these files: + config/dos/owatcom.cf + config/linux/owatcom.cf + config/os2/gcc.cf + config/w32/owatcom.cf + config/w32/watcom.cf + 2008-08-12 19:31 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * doc/linux1st.txt * Updated with hbgf package requirement information. diff --git a/harbour/config/dos/djgpp.cf b/harbour/config/dos/djgpp.cf index 10fa2868c8..a3749c6ab8 100644 --- a/harbour/config/dos/djgpp.cf +++ b/harbour/config/dos/djgpp.cf @@ -12,10 +12,7 @@ LIB_EXT = .a CC = gcc CC_IN = -c CC_OUT = -o -CPPFLAGS = -I. -I$(TOP)include -Iinclude -ifneq ($(HB_INC_COMPILE),) - CPPFLAGS = -I. -I$(HB_INC_COMPILE) -endif +CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = -Wall -W LD = gcc diff --git a/harbour/config/w32/bcc32.cf b/harbour/config/w32/bcc32.cf index 187bdc8c4b..99b93bfb8e 100644 --- a/harbour/config/w32/bcc32.cf +++ b/harbour/config/w32/bcc32.cf @@ -14,13 +14,9 @@ LIB_EXT = .lib CC = bcc32.exe CC_IN = -c CC_OUT = -o -CPPFLAGS = -I. -I$(TOP) -I$(TOP)$(ROOT) +CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = -O2 -d -w -w-sig- -ifneq ($(HB_INC_COMPILE),) -CPPFLAGS += -I$(HB_INC_COMPILE) -endif - LD = bcc32.exe LDFLAGS = -O2 LD_OUT = -e diff --git a/harbour/config/w32/dm.cf b/harbour/config/w32/dm.cf new file mode 100644 index 0000000000..6371b33814 --- /dev/null +++ b/harbour/config/w32/dm.cf @@ -0,0 +1,98 @@ +# +# $Id$ +# + +# GNU MAKE file for Digital Mars Compiler + +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf + +OBJ_EXT = .obj +EXE_EXT = .exe +LIB_PREF = +LIB_EXT = .lib + +CC = dmc +CC_IN = -c +CC_OUT = -o +CPPFLAGS = -I. -I$(HB_INC_COMPILE) + +CFLAGS = -6 -cpp -mn -o+time +# TOFIX: Remove this if not absolutely necessary +CFLAGS += -D_MSC_VER + +# Add all libraries specified in CONTRIBS and LIBS. +ifeq ($(HB_LIB_COMPILE),) +LINKLIBS += $(foreach lib, $(CONTRIBS), $(TOP)$(ROOT)/contrib/$(lib)/$(ARCH_DIR)/$(subst lib,,$(lib))$(LIB_EXT)) +LINKLIBS += $(foreach lib, $(LIBS), $(TOP)$(ROOT)/source/$(lib)/$(ARCH_DIR)/$(lib)$(LIB_EXT)) +else +LINKPATHS += -L$(HB_LIB_COMPILE) +LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(lib)$(LIB_EXT)) +LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) +endif + +# If LIBS specifies the rdd library, add all DB drivers. +ifeq ($(findstring rdd,$(LIBS)),rdd) +ifeq ($(HB_LIB_COMPILE),) +LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(TOP)$(ROOT)/source/rdd/$(drv)/$(ARCH_DIR)/$(drv)$(LIB_EXT)) +else +LINKPATHS += -L$(HB_LIB_COMPILE) +LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) +endif +endif + +# Add the specified GT driver library +ifeq ($(findstring rtl,$(LIBS)),rtl) +LINKLIBS += $(TOP)$(ROOT)source/rtl/$(HB_GT_LIB)/$(ARCH_DIR)/$(HB_GT_LIB)$(LIB_EXT) +ifeq ($(HB_MULTI_GT),yes) +LINKLIBS += $(TOP)$(ROOT)source/rtl/gtnul/$(ARCH_DIR)/gtnul$(LIB_EXT) +endif +endif + +ifneq ($(HB_SCREEN_LIB),) +LINKLIBS += $(HB_SCREEN_LIB) +endif + +# Add the optional user path(s) +ifneq ($(LNK_USR_PATH),) +LINKPATHS += $(foreach path, $(LNK_USR_PATH), -L$(path)) +endif + +# Add the optional user libarary (or libraries) +ifneq ($(LNK_USR_LIB),) +LINKLIBS += $(foreach lib, $(LNK_USR_LIB), $(lib)$(LIB_EXT)) +endif + +SYSLIBS = user32 winspool gdi32 comctl32 comdlg32 ole32 oleaut32 uuid wsock32 advapi32 +LINKLIBS += $(SYSLIBS) + +define link_exe_file +echo $(subst /,\,$(^F)) > __link__.tmp +echo $@ >> __link__.tmp +echo. >> __link__.tmp +echo $(subst /,\,$(LINKLIBS)) >> __link__.tmp +$(LD) $(LDFLAGS) @__link__.tmp +endef + +LD = link +LDFLAGS = /NOMAP /EXETYPE:NT /SUBSYSTEM:CONSOLE $(LINKPATHS) $(L_USR) +LDOBJS = $(foreach file, $(^F), $(file)) +LD_RULE = $(LD) $(LDFLAGS) $(subst /,\,$(LDOBJS)), $@,, $(subst /,\,$(LINKLIBS)) + +define create_library +echo $@ > __lib__.tmp +echo $(^F) >> __lib__.tmp +$(AR) $(ARFLAGS) @__lib__.tmp +endef + +AR = lib +ARFLAGS = -c $(A_USR) +AROBJS = $(foreach file, $(^F), $(file)) +AR_RULE = $(AR) $(ARFLAGS) $@ $(AROBJS) + +ifeq ($(COMMAND_COM),yes) +# workaround for command line size limit +LD_RULE = $(link_exe_file) +AR_RULE = $(create_library) +endif + +include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/w32/xcc.cf b/harbour/config/w32/xcc.cf index a754a25620..9bd9bfadc7 100644 --- a/harbour/config/w32/xcc.cf +++ b/harbour/config/w32/xcc.cf @@ -14,17 +14,13 @@ LIB_EXT = .lib CC = xcc.exe CC_IN = -c CC_OUT = -Fo -CPPFLAGS = -I. -I$(TOP) -I$(TOP)$(ROOT) +CPPFLAGS = -I. -I$(HB_INC_COMPILE) # disabled - it produces bad code #CPPFLAGS += -Ot # For Pocket PC and ARM processors (including XScale) #CPPFLAGS += /Tarm-coff -ifneq ($(HB_INC_COMPILE),) -CPPFLAGS += -I$(HB_INC_COMPILE) -endif - CFLAGS = LD = xlink.exe