Builds only the current host architecture, so this is equivalent to the target install.$EPISC_HOST_ARCH
99 lines
2.8 KiB
Plaintext
99 lines
2.8 KiB
Plaintext
#*************************************************************************
|
|
# Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
|
|
# National Laboratory.
|
|
# Copyright (c) 2002 The Regents of the University of California, as
|
|
# Operator of Los Alamos National Laboratory.
|
|
# EPICS BASE is distributed subject to a Software License Agreement found
|
|
# in the file LICENSE that is included with this distribution.
|
|
#*************************************************************************
|
|
#
|
|
# $Revision-Id$
|
|
#
|
|
|
|
all: install
|
|
host: install$(DIVIDER)$(EPICS_HOST_ARCH)
|
|
|
|
ACTIONS = inc
|
|
ACTIONS += build
|
|
ACTIONS += install
|
|
ACTIONS += buildInstall
|
|
ACTIONS += browse
|
|
ACTIONS += runtests tapfiles
|
|
#ACTIONS += rebuild
|
|
|
|
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
|
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
|
|
|
actionArchTargets = $(foreach x, $(ACTIONS),\
|
|
$(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
|
|
|
|
cleanArchTargets = $(foreach arch,$(BUILD_ARCHS), clean$(DIVIDER)$(arch))
|
|
|
|
buildDirs = $(addprefix O.,$(BUILD_ARCHS))
|
|
|
|
#*************************************************************************
|
|
# Create epics_host_arch dependancies for GNU make -j option
|
|
# Only works with GNU make 3.81 or later (uses eval function)
|
|
# Needed in dirs where EPICS_HOST_ARCH build creates a tool used in
|
|
# cross arch builds
|
|
|
|
CROSS_ARCHS += $(CROSS1) $(CROSS2)
|
|
|
|
define DEP_template
|
|
$(2): $$(EPICS_HOST_ARCH)
|
|
$(1)$$(DIVIDER)$(2): $(1)$$(DIVIDER)$$(EPICS_HOST_ARCH) O.$(2)
|
|
endef
|
|
|
|
ifeq ($(MAKE_VERSION),3.81)
|
|
$(foreach action, $(ACTIONS), $(foreach arch,\
|
|
$(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch)))))
|
|
else
|
|
ifeq ($(findstring j,$(MAKEFLAGS)),j)
|
|
$(foreach action, $(ACTIONS), $(foreach arch,\
|
|
$(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch)))))
|
|
endif
|
|
endif
|
|
#*************************************************************************
|
|
|
|
# Allows rebuild to work with parallel builds option, -j.
|
|
ifeq (rebuild,$(filter rebuild,$(MAKECMDGOALS)))
|
|
$(buildDirs) O.Common : clean
|
|
rebuild: install
|
|
endif
|
|
|
|
$(actionArchTargets) : $(buildDirs) O.Common
|
|
$(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. T_A=$(archPart) $(actionPart)
|
|
|
|
$(BUILD_ARCHS) : % : O.% O.Common
|
|
$(MAKE) -C O.$@ -f ../Makefile TOP=$(TOP)/.. T_A=$@
|
|
|
|
$(ACTIONS):%: $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch))
|
|
|
|
$(buildDirs):
|
|
$(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/..
|
|
|
|
O.Common:
|
|
$(MKDIR) O.Common
|
|
|
|
#
|
|
# special clean rule
|
|
#
|
|
clean : archs_common_clean
|
|
|
|
archs_common_clean :
|
|
$(RMDIR) $(addprefix O.,$(BUILD_ARCHS)) O.Common
|
|
|
|
archclean :
|
|
$(RMDIR) $(addprefix O.,$(BUILD_ARCHS))
|
|
|
|
$(cleanArchTargets) :
|
|
$(RMDIR) O.$(archPart)
|
|
|
|
realclean :
|
|
$(RMDIR) O.*
|
|
|
|
.PHONY : $(actionArchTargets)
|
|
.PHONY : $(cleanArchTargets)
|
|
.PHONY : $(BUILD_ARCHS) rebuild arch_common_clean
|
|
.PHONY : $(ACTIONS) clean realclean archclean host all
|