* config/none.mk
* config/global.mk
* config/bsd/gcc.mk
* config/lib.mk
* config/wce/mingwarm.mk
* config/wce/poccarm.mk
* config/wce/msvcarm.mk
* config/bin.mk
* config/dir.mk
* config/hpux/gcc.mk
* config/darwin/gcc.mk
* config/dos/watcom.mk
* config/dos/djgpp.mk
* config/win/xcc.mk
* config/win/mingw.mk
* config/win/msvc64.mk
* config/win/iccia64.mk
* config/win/pocc.mk
* config/win/bcc.mk
* config/win/watcom.mk
* config/win/mingw64.mk
* config/win/msvcia64.mk
* config/win/gcc.mk
* config/win/pocc64.mk
* config/win/icc.mk
* config/win/cygwin.mk
* config/win/msvc.mk
* config/header.mk
* config/linux/watcom.mk
* config/linux/gcc.mk
* config/linux/icc.mk
* config/linux/sunpro.mk
* config/os2/watcom.mk
* config/os2/gcc.mk
* config/sunos/gcc.mk
* config/sunos/sunpro.mk
* config/doc.mk
* config/install.mk
* Renaming .cf files to .mk.
Pass 2. Changing .cf references to .mk ones inside config.
SVN is in non-working state yet.
91 lines
1.8 KiB
Makefile
91 lines
1.8 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
include $(TOP)$(ROOT)config/global.mk
|
|
|
|
ifneq ($(HB_ARCHITECTURE),)
|
|
ifneq ($(HB_COMPILER),)
|
|
|
|
ifeq ($(HB_HOST_ARCH),dos)
|
|
# do not use rules for parallel processing in DOS
|
|
JOB_SRV := NO
|
|
else
|
|
# these make versions does not work correctly with
|
|
# parallel execution rules below
|
|
JOB_SRV := $(MAKE_VERSION:3.7%=NO)
|
|
JOB_SRV := $(JOB_SRV:3.80%=NO)
|
|
endif
|
|
|
|
ifeq ($(JOB_SRV),NO)
|
|
include $(TOP)$(ROOT)config/dirsh.mk
|
|
endif
|
|
|
|
ifeq ($(DIR_RULE),)
|
|
|
|
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
|
# It causes that every command will be separated by LF
|
|
define dir_mk
|
|
@$(MK) $(MKFLAGS) -C $(dir) $@
|
|
|
|
endef
|
|
|
|
DIRS_PURE := $(filter-out {%},$(subst {, {,$(DIRS)))
|
|
DIRS_DEP := $(filter-out $(DIRS_PURE),$(DIRS))
|
|
DIRS_MK := $(foreach d, $(DIRS_PURE), $(if $(wildcard $(d)/Makefile),$(d),))
|
|
DIR_RULE := $(foreach dir, $(DIRS_MK), $(dir_mk))
|
|
MULTI_DEPS := yes
|
|
|
|
else
|
|
|
|
DIRS := $(filter-out {%},$(subst {, {,$(DIRS)))
|
|
MULTI_DEPS := no
|
|
|
|
endif
|
|
|
|
all : first
|
|
|
|
ifneq ($(MULTI_DEPS),yes)
|
|
|
|
first clean install::
|
|
+$(DIR_RULE)
|
|
|
|
else
|
|
|
|
DIRS_CLEAN := $(foreach dir, $(DIRS_MK), $(dir).clean)
|
|
DIRS_INST := $(foreach dir, $(DIRS_MK), $(dir).inst)
|
|
|
|
ifneq ($(_HB_BLD),yes)
|
|
first :: $(DIRS_MK)
|
|
endif
|
|
install :: $(DIRS_INST)
|
|
clean :: $(DIRS_CLEAN)
|
|
|
|
comma := ,
|
|
define dep_rule
|
|
$(subst $(comma),$(2) ,$(subst },$(2),$(subst {,$(2)::|,$(1))))
|
|
endef
|
|
|
|
$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),.clean)))
|
|
$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),.inst)))
|
|
$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),)))
|
|
|
|
$(DIRS_CLEAN) ::
|
|
+@$(MK) $(MKFLAGS) -C $(@:.clean=) clean
|
|
|
|
$(DIRS_INST) ::
|
|
+@$(MK) $(MKFLAGS) -C $(@:.inst=) install _HB_BLD=yes
|
|
|
|
$(DIRS_MK) ::
|
|
+@$(MK) $(MKFLAGS) -C $(@)
|
|
|
|
endif
|
|
|
|
ifneq ($(HB_POSTINST),)
|
|
install::
|
|
+$(HB_POSTINST)
|
|
endif
|
|
|
|
endif
|
|
endif
|