Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Kbuild 1019 B
##############################################################################
# @file Kbuild
#
# @brief Kbuild for compiling CDCM.
#
# @author Copyright (C) 2009 CERN. Yury GEORGIEVSKIY <ygeorgie@cern.ch>
#
# @date Created on 26/08/2009
###############################################################################

# Include generic definitions
include $(ROOTDIR)/makefiles/Kbuild.include

# Extra CC flags && needed pathes
ccflags-y += \
	-Wno-strict-prototypes \
	-I$(ROOTDIR)/utils \
	-I/acc/local/$(CPU)/include

# CDCM files
cdcm-y := $(OBJFILES)

# Shipped CDCM objects
shipped-cdcm := $(addsuffix _shipped, $(addprefix $(OBJDIR)/,$(cdcm-y)))

# That's what we'll do
always := outdir $(cdcm-y) $(shipped-cdcm)

# All compiled files goes here
$(obj)/outdir:
	@mkdir -p $(obj)/$(OBJDIR)

# Shipping CDCM objects
quiet_cmd_ship_cdcm = SHIPPING $<
      cmd_ship_cdcm = mv $< $@

# Tell Makefile HOWTO ship them
$(addprefix $(obj)/,$(shipped-cdcm)): $(obj)/$(OBJDIR)/%.o_shipped: $(obj)/%.o
	$(call cmd,ship_cdcm)