bsd

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  
c:\harbour\config\bsd
c:\harbour\config\bsd\dir.cf
#
# $Id: dir.cf 4697 2001-12-05 20:30:57Z dholm $
#

ifeq ($(PM),) # Only traverse directories if not compiling a specific module

DIR_RULE =\
	@for d in $(DIRS); do \
	  if [ -d $$d ]; then \
	    $(MAKE) -C $$d $@; \
	  fi \
	done


c:\harbour\config\bsd\gcc.cf
#
# $Id: gcc.cf 9516 2008-09-29 14:02:59Z vszakats $
#

include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf

OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a

CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -Wall -W -O3

LD = gcc
LD_OUT = -o

# Add all libraries specified in CONTRIBS and LIBS.
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS += -L$(LIB_DIR)
else
LINKPATHS += -L$(HB_LIB_COMPILE)
endif

LINKLIBS += -Wl,--start-group

LINKLIBS += $(foreach lib, $(CONTRIBS), -l$(subst lib,,$(lib)))
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))

# If LIBS specifies the rdd library, add all DB drivers.
ifeq ($(findstring rdd,$(LIBS)),rdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif

# Add the specified GT driver library and other RTLs
ifeq ($(findstring rtl,$(LIBS)),rtl)

LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))

# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB=ncurses
endif

ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif

ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
# In BSD, slang still needs curses :(
ifeq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
endif

ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif

# HB_GPM_MOUSE: use gpm mouse driver
# Actually, there is no gpm on BSD.
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
endif

LINKPATHS += -L/usr/local/lib

endif

ifneq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
LINKLIBS += -lpcre
endif

ifneq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
LINKLIBS += -lz
endif

LINKLIBS += -lm -Wl,--end-group

LDFLAGS +=  $(LINKPATHS)

AR = ar
ARFLAGS = $(A_USR)
AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@

include $(TOP)$(ROOT)config/rules.cf
c:\harbour\config\bsd\global.cf
#
# $Id: global.cf 9487 2008-09-23 23:38:08Z vszakats $
#

all : first

HB_GT_LIST=\
	gtcgi \
	gtpca \
	gtstd \
	gttrm \

ifneq ($(HB_WITHOUT_GTCRS),yes)
   HB_GT_LIST += gtcrs
endif
ifeq ($(HB_COMMERCE),yes)
   HB_GPM_MOUSE = no
else
ifneq ($(HB_WITHOUT_GTSLN),yes)
   HB_GT_LIST += gtsln
endif
endif
ifneq ($(HB_WITHOUT_X11),yes)
   HB_GT_LIST += gtxwc
endif

# verify if GT drivers exist
HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))

MAKE = gmake

ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
RANLIB = ranlib

dirbase::
	@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
	@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)

clean::
	-$(RD) $(ARCH_DIR) $(LIB_ARCH)
c:\harbour\config\bsd\install.cf
#
# $Id: install.cf 8279 2008-02-04 08:32:17Z druzus $
#

INSTALL_RULE =\
	@if [ ! -d $(INSTALL_DIR) ]; \
	then \
	  echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \
	else \
	  for i in $(INSTALL_OBJS); \
	  do \
	    if [ -r $$i ]; \
	    then \
	      echo "! Installing $$i on $(INSTALL_DIR)"; \
	      $(CP) $$i $(INSTALL_DIR); \
	    else \
	      echo "! Can't install $$i, not found" 1>&2; \
	    fi \
	  done \
	fi

Page url: http://www.yourdomain.com/help/index.html?bsd.htm