Files
harbour-core/harbour/config/os2/gcc.cf
Viktor Szakats 97e2f86709 2009-07-16 02:57 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
- config/hpux/dir.cf
  * config/hpux/global.cf
  - config/hpux/install.cf
  - config/darwin/dir.cf
  * config/darwin/global.cf
  - config/darwin/install.cf
  - config/dos/dir.cf
  * config/dos/global.cf
  - config/dos/install.cf
  * config/win/global.cf
  - config/win/install.cf
  - config/win/dir.cf
  - config/linux/dir.cf
  * config/linux/global.cf
  - config/linux/install.cf
  - config/os2/dir.cf
  * config/os2/global.cf
  - config/os2/install.cf
  - config/sunos/dir.cf
  * config/sunos/global.cf
  - config/sunos/install.cf
  - config/bsd/dir.cf
  * config/bsd/global.cf
  - config/bsd/install.cf
  - config/wce/dir.cf
  * config/wce/global.cf
  - config/wce/install.cf
    * Minor change in dos specific dirbase:: checks. Should be
      equivalent.
    * darwin/gcc was running RANLIB on install. I've removed
      this for now and if ranlib is required on Darwin, it
      should be readded to gcc.cf.

  * config/os2/gcc.cf
    * Changed to not rely on LIB_FILE_OS.

  * config/dir.cf
  + config/dirsh.cf
  * config/global.cf
  + config/globsh.cf
  * config/install.cf
  + config/instsh.cf
    ! Fixed NT vs dos shell detection. (hopefully)
    + Shell dependent logic merged and moved into new *_sh.cf
      files. The filename is ugly, but couldn't yet find a better one.
      This means a great deal of redundancy is now removed, plus
      now cross-platform combinations aren't limited by missing
      shell support. New shells can now be added with much less work.
    ; Please test, it's possible that I made some mistakes along the way,
      and haven't tested bash yet. Nor OS/2 obviously.
2009-07-16 01:02:11 +00:00

111 lines
2.4 KiB
CFEngine3

#
# $Id$
#
ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP = g++
else
HB_CMP = gcc
endif
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .a
CC = $(HB_CMP)
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS =
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -Wall -W
endif
ifneq ($(HB_BUILD_OPTIM),no)
CFLAGS += -O3
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
LD = $(HB_CMP)
LDFLAGS =
# NOTE: The ending space after -o is important, please preserve it.
# Now solved with '$(subst x,x, )' expression.
LD_OUT = -o$(subst x,x, )
ifeq ($(C_MAIN),)
ifeq ($(HB_GT_LIB),os2pm)
# If building a PM program, override the main object.
LDFLAGS +=$(TOP)$(ROOT)source/vm/$(OBJ_DIR)/mainpm.o
endif
endif
# Add all libraries specified in LIBS.
LINKPATHS += -L$(LIB_DIR)
#LINKLIBS += -Wl,-(
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the RDD library, add all DB drivers.
ifeq ($(findstring hbrdd,$(LIBS)),hbrdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring hbrtl,$(LIBS)),hbrtl)
ifeq ($(C_MAIN),)
ifeq ($(findstring os2pm,$(HB_GT_LIB)),os2pm)
# Special handling for PM mode
LINKLIBS += -l$(HB_GT_LIB)
LINKLIBS += -lgtos2
else
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
endif
endif
endif
# add socket library
LINKLIBS += -lsocket
#LINKLIBS += -Wl,-)
# statical linking with GCC 3.2.2 libc as not require its presence on user system
LDFLAGS += $(LINKPATHS)
ifeq ($(C_MAIN),)
ifeq ($(HB_GT_LIB),os2pm)
# Override the default link rule in order to add a call to emxbind
LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$(EXE_DIR)/$@ $(^F) $(LDFLAGS) $(HB_USER_LDFLAGS) $(LINKLIBS) & emxbind -ep $@
endif
endif
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that every echo command will be separated by LF
#define lib_object
#echo ADDMOD $(file) >> __lib__.tmp
#
#endef
# We have to use a script to overcome the AR limit of max 850 characters
# in commmand line
define create_library
if exist $(subst /,$(DIRSEP),$(LIB_FILE)) $(RM) $(subst /,$(DIRSEP),$(LIB_FILE))
echo CREATE $(LIB_DIR)/$@ > __lib__.tmp
for %i in ( *$(OBJ_EXT) ) do @echo ADDMOD %i >> __lib__.tmp
echo SAVE >> __lib__.tmp
echo END >> __lib__.tmp
$(AR) -M < __lib__.tmp
endef
# Under OS/2 || isn't a command separator (inside a shell, that is); correct separator is &
AR = ar
ARFLAGS = $(HB_USER_AFLAGS)
AR_RULE = $(create_library) & $(RM) __lib__.tmp
include $(TOP)$(ROOT)config/rules.cf