Add build Make File

This commit is contained in:
HuangXin 2019-03-01 18:06:49 +08:00
parent 3d2815067a
commit 147f2cb7c1
1 changed files with 743 additions and 0 deletions

743
Makefile.cross Executable file
View File

@ -0,0 +1,743 @@
ifeq ($(SHOW_MAKE_EVENT), TRUE)
$(info MAKEFILES:$(MAKEFILES))
$(info MAKEFILES_LIST:$(MAKEFILES_LIST))
$(info SHELL:$(SHELL))
$(info MAKESHELL:$(MAKESHELL))
$(info MAKE:$(MAKE))
$(info MAKELEVEL:$(MAKELEVEL))
$(info MAKECMDGOALS:$(MAKECMDGOALS))
$(info SUFFIXES:$(SUFFIXES))
$(info LIBPATTERNS:$(.LIBPATTERNS))
endif
TARGET_STRIP ?= TRUE
$(info Make $(TARGET_OBJ): $(CURDIR))
SHELL := /bin/sh
ifeq ($(DEBUG), TRUE)
TARGET_OUT_DIR ?= debug/
else
TARGET_OUT_DIR ?= release/
endif
# default install directory
ifeq ($(DIR), )
INSTALL_ROOT := $(addprefix ../,../release)
else
INSTALL_ROOT := $(addprefix ../,$(DIR))
endif
# install directory
# Check host OS and set shell command
# RM : delete file command
RM = rm -rf
MKDIR = mkdir -p
CP = cp -f
# Set Kernel Source Code Path For Build Driver
ifeq ($(TARGET_OBJ), DRV)
R16_KERNEL := $(shell echo ${ALLWINNER_R16_KERNEL})
R311_KERNEL := $(shell echo ${ALLWINNER_R311_KERNEL})
endif
R16_SDK_INCLUDE := $(shell echo ${R16_SDK_INCLUDE})
R16_SDK_LIBDIR := $(shell echo ${R16_SDK_LIBDIR})
R311_SDK_INCLUDE := $(shell echo ${R311_SDK_INCLUDE})
R311_SDK_LIBDIR := $(shell echo ${R311_SDK_LIBDIR})
TARGET_EXT_WIN := .dll
CPU_R16_DIR := R16
CPU_R311_DIR := R311
CPU_LINUX_DIR := LINUX
CPU_WIN32_DIR := WIN32
CPU_WIN64_DIR := WIN64
# Set ext name of driver
ifeq ($(TARGET_TYPE), KO)
TARGET_EXT := .ko
else ifeq ($(TARGET_TYPE), DLL)
TARGET_EXT := .so
else ifeq ($(TARGET_TYPE), SDK)
TARGET_EXT := .so
else ifeq ($(TARGET_TYPE), LIB)
TARGET_EXT := .a
TARGET_EXT_WIN := .lib
else ifeq ($(TARGET_TYPE), EXE)
TARGET_EXT := .exe
TARGET_EXT_WIN := .exe
else ifeq ($(TARGET_TYPE), SH)
UNMAKE_PROCESS := TRUE
else
$(error Unknown TARGET_TYPE Value Of [$(TARGET_TYPE)], It's Must Be Set Of KO/EXE/DLL/LIB/SDK)
endif
# Set prefix name of driver
ifeq ($(TARGET_TYPE), LIB)
TARGET_PREFIX := lib
else ifeq ($(TARGET_TYPE), SDK)
TARGET_PREFIX := lib
else
TARGET_PREFIX :=
endif
ifneq ($(MAKE_TARGET), )
MAKECMD_COLOR := \033[36;48m\033[1m$(shell env printf "%-10s" {$(MAKE_TARGET)}) \033[0m
else
MAKECMD_COLOR :=
endif
CLEAN_COLOR := $(MAKECMD_COLOR)\033[31;48m\033[1m[CLEAN]\033[0m
PATH_COLOR := \033[34;48m\033[1m($(CURDIR))\033[0m
INSTALL_PATH_COLOR := \033[34;48m\033[1m(TO $(INSTALL_ROOT))\033[0m
INSTALL_COLOR := \033[36;48m\033[1m[INSTALL]\033[0m
PRE_INSTALL_COLOR := \033[36;48m\033[1m[PRE INSTALL]\033[0m
INSTALL_USER_ITEM_COLOR := \033[36;48m\033[1m[INSTALL USER ITEMS]\033[0m
INSTALL_MULT_PLAT_COLOR := \033[36;48m\033[1m[INSTALL MULTPLATFORM ITEMS]\033[0m
INSTALL_IDK_ITEM_COLOR := \033[36;48m\033[1m[INSTALL IDK ITEMS]\033[0m
TARGET_TYPE_COLOR := \t\033[35;48m\033[1m$(shell env printf "%5s" [$(TARGET_TYPE)])\033[0m
TARGET_OBJ_COLOR := \t\033[34;48m\033[1m$(shell env printf "%5s" [$(TARGET_OBJ)])\033[0m
TARGET_MIX_COLOR := $(TARGET_TYPE_COLOR)$(TARGET_OBJ_COLOR)
PLAT_R311_COLOR := $(MAKECMD_COLOR)\033[32;48m\033[1m$(shell env printf "%-8s" [R311])\033[0m$(TARGET_MIX_COLOR)
PLAT_R16_COLOR := $(MAKECMD_COLOR)\033[32;48m\033[1m$(shell env printf "%-8s" [R16])\033[0m$(TARGET_MIX_COLOR)
PLAT_LINUX_COLOR := $(MAKECMD_COLOR)\033[32;48m\033[1m$(shell env printf "%-8s" [LINUX])\033[0m$(TARGET_MIX_COLOR)
PLAT_WIN32_COLOR := $(MAKECMD_COLOR)\033[32;48m\033[1m$(shell env printf "%-8s" [WIN-x86])\033[0m$(TARGET_MIX_COLOR)
PLAT_WIN64_COLOR := $(MAKECMD_COLOR)\033[32;48m\033[1m$(shell env printf "%-8s" [WIN-x64])\033[0m$(TARGET_MIX_COLOR)
# set gcc flags
ifeq ($(DEBUG), TRUE)
DEBUG_CFLAGS := -g3
endif
DEBUG_CFLAGS += -O2
LINUX_EXTFLAG += $(DEBUG_CFLAGS)
WIN32_EXTFLAG += $(DEBUG_CFLAGS)
ifeq ($(DISABLE_WARRING), TRUE)
LINUX_EXTFLAG += -w
WIN32_EXTFLAG += -w
endif
ifeq ($(TARGET_OBJ), DRV)
# kernel module driver build flags
DRV_CFLAGS := -m32 -D__KERNEL__ \
-DMODULE -D"KBUILD_STR(s)=\#s" -D"KBUILD_MODNAME=KBUILD_STR($(TARGET_NAME))" \
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing \
-fno-common -Werror-implicit-function-declaration -Wno-format-security \
-fno-delete-null-pointer-checks -O2 -msoft-float -pipe -Iarch/powerpc \
-ffixed-r2 -mmultiple -mno-altivec -mno-spe -mspe=no -funit-at-a-time \
-mno-string -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement \
-Wno-pointer-sign
ARM_DRV_CFLAGS := -nostdinc \
-isystem /mnt/data/cross_tools/mvr16/armv7-marvell-linux-gnueabi-softfp_i686/bin/../lib/gcc/arm-openwrt-linux/4.6.4/include \
-DMODULE -D"KBUILD_STR(s)=\#s" -D"KBUILD_MODNAME=KBUILD_STR($(TARGET_NAME))" \
-D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security \
-fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs \
-mno-sched-prolog -fstack-protector -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 \
-march=armv7-a -msoft-float -Uarm -Wno-unused-but-set-variable -fno-omit-frame-pointer \
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign \
-fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -DMV_LINUX -DMV_CPU_LE -DMV_ARM
R16_EXTFLAG += $(DEBUG_CFLAGS) $(ARM_DRV_CFLAGS) -I$(R16_KERNEL)/arch/arm/include \
-Iarch/arm/include/generated -I$(R16_KERNEL)/include \
-include $(R16_KERNEL)/include/linux/kconfig.h \
-I$(R16_KERNEL)/arch/arm/plat-armada/common \
-I$(R16_KERNEL)/arch/arm/plat-armada/linux_oss \
-I$(R16_KERNEL)/arch/arm/plat-armada/mv_hal \
-I$(R16_KERNEL)/arch/arm/plat-armada/mv_hal/neta \
-I$(R16_KERNEL)/arch/arm/mach-armadaxp/armada_xp_family \
-I$(R16_KERNEL)/arch/arm/mach-armadaxp/config \
-I$(R16_KERNEL)/arch/arm/mach-armadaxp/mv_hal_if \
-I$(R16_KERNEL)/arch/arm/plat-armada/mv_drivers_lsp/mv_trace \
-I$(R16_KERNEL)/arch/arm/plat-armada/mv_drivers_lsp/mv_switch \
-I$(R16_KERNEL)/arch/arm/mach-armadaxp/include \
-I$(R16_KERNEL)/arch/arm/plat-armada/include \
-I$(R16_KERNEL)/arch/arm/include/generated
R16_DRV_LDFLAGS = -EL -r -T $(R16_KERNEL)/scripts/module-common.lds --build-id
else ifeq ($(TARGET_OBJ), APP)
# mvr16 linux kernel include head files path and MCU special arguments
R16_EXTFLAG += $(DEBUG_CFLAGS) -I$(R16_SDK_INCLUDE) -I$(R16_SDK_INCLUDE)/dbus-1.0 -I$(R16_SDK_INCLUDE)/glib-2.0
R311_EXTFLAG += $(DEBUG_CFLAGS) -I$(R311_SDK_INCLUDE) -I$(R311_SDK_INCLUDE)/dbus-1.0 -I$(R311_SDK_INCLUDE)/glib-2.0
# show all warring
#CFLAGS += -Wall
R16_DRV_LDFLAGS := -L$(R16_SDK_LIBDIR)
R311_DRV_LDFLAGS := -L$(R311_SDK_LIBDIR)
else ifeq ($(TARGET_OBJ), SH)
else
$(error Unknown TARGET_OBJ Value Of [$(TARGET_OBJ)], It's Must Be Set Of APP/DRV)
endif
# set output directory
ifeq ($(DEBUG), TRUE)
BUILD_DIR := debug
else
BUILD_DIR := release
endif
# build object output root
OUTPUT_DIR := ./.build/
# build object output path
PLAT_R16_DIR := $(OUTPUT_DIR)$(TARGET_NAME)_$(TARGET_TYPE)_$(TARGET_OBJ)_r16_$(BUILD_DIR)
PLAT_R311_DIR := $(OUTPUT_DIR)$(TARGET_NAME)_$(TARGET_TYPE)_$(TARGET_OBJ)_r311_$(BUILD_DIR)
PLAT_LINUX_DIR := $(OUTPUT_DIR)$(TARGET_NAME)_$(TARGET_TYPE)_$(TARGET_OBJ)_linux_$(BUILD_DIR)
PLAT_WIN32_DIR := $(OUTPUT_DIR)$(TARGET_NAME)_$(TARGET_TYPE)_$(TARGET_OBJ)_win32_$(BUILD_DIR)
PLAT_WIN64_DIR := $(OUTPUT_DIR)$(TARGET_NAME)_$(TARGET_TYPE)_$(TARGET_OBJ)_win64_$(BUILD_DIR)
# Install path
ifeq ($(TARGET_TYPE), SDK)
PLAT_LINUX_PUBLISH_DIR := $(INSTALL_ROOT)/sdk/$(CPU_LINUX_DIR)/
PLAT_LINUX_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/sdk.debug/$(CPU_LINUX_DIR)/
PLAT_WIN32_PUBLISH_DIR := $(INSTALL_ROOT)/sdk/$(CPU_WIN32_DIR)/
PLAT_WIN32_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/sdk.debug/$(CPU_WIN32_DIR)/
else ifeq ($(TARGET_BOX), test)
PLAT_LINUX_PUBLISH_DIR := $(INSTALL_ROOT)/$(TARGET_NAME)//$(CPU_LINUX_DIR)/
PLAT_LINUX_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(TARGET_NAME).debug/$(CPU_LINUX_DIR)/
PLAT_WIN32_PUBLISH_DIR := $(INSTALL_ROOT)/$(TARGET_NAME)/$(CPU_WIN32_DIR)/
PLAT_WIN32_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(TARGET_NAME).debug/$(CPU_WIN32_DIR)/
else
ifeq ($(TARGET_BOX), )
PLAT_R16_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_R16_DIR)/$(TARGET_BOX)/
PLAT_R16_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_R16_DIR)/$(TARGET_BOX)/
PLAT_R311_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_R311_DIR)/$(TARGET_BOX)/
PLAT_R311_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_R311_DIR)/$(TARGET_BOX)/
ifeq ($(WIN32_USER_INS_DIR), )
PLAT_WIN32_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_WIN32_DIR)/$(TARGET_BOX)/
PLAT_WIN64_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_WIN64_DIR)/$(TARGET_BOX)/
else
PLAT_WIN32_PUBLISH_DIR := $(INSTALL_ROOT)/$(WIN32_USER_INS_DIR)/$(CPU_WIN32_DIR)/$(TARGET_BOX)/
PLAT_WIN64_PUBLISH_DIR := $(INSTALL_ROOT)/$(WIN64_USER_INS_DIR)/$(CPU_WIN64_DIR)/$(TARGET_BOX)/
endif
ifeq ($(LINUX_USER_INS_DIR), )
PLAT_LINUX_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_LINUX_DIR)/$(TARGET_BOX)/
else
PLAT_LINUX_PUBLISH_DIR := $(INSTALL_ROOT)/$(LINUX_USER_INS_DIR)/$(CPU_LINUX_DIR)/$(TARGET_BOX)/
endif
PLAT_R16_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_R16_DIR)/$(TARGET_BOX)/
PLAT_R311_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_R16_DIR)/$(TARGET_BOX)/
ifeq ($(WIN32_USER_INS_DIR), )
PLAT_WIN32_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_WIN32_DIR)/$(TARGET_BOX)/
PLAT_WIN64_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_WIN64_DIR)/$(TARGET_BOX)/
else
PLAT_WIN32_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(WIN32_USER_INS_DIR).debug/$(CPU_WIN32_DIR)/$(TARGET_BOX)/
PLAT_WIN64_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(WIN64_USER_INS_DIR).debug/$(CPU_WIN64_DIR)/$(TARGET_BOX)/
endif
ifeq ($(LINUX_USER_INS_DIR), )
PLAT_LINUX_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_LINUX_DIR)/$(TARGET_BOX)/
else
PLAT_LINUX_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(LINUX_USER_INS_DIR).debug/$(CPU_LINUX_DIR)/$(TARGET_BOX)/
endif
else
PLAT_R16_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_R16_DIR)/$(TARGET_BOX)-r16/
PLAT_R311_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_R16_DIR)/$(TARGET_BOX)-r311/
ifeq ($(WIN32_USER_INS_DIR), )
PLAT_WIN32_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_WIN32_DIR)/$(TARGET_BOX)-win32/
PLAT_WIN64_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_WIN64_DIR)/$(TARGET_BOX)-win64/
else
PLAT_WIN32_PUBLISH_DIR := $(INSTALL_ROOT)/$(WIN32_USER_INS_DIR)/$(CPU_WIN32_DIR)/$(TARGET_BOX)-win32/
PLAT_WIN64_PUBLISH_DIR := $(INSTALL_ROOT)/$(WIN64_USER_INS_DIR)/$(CPU_WIN64_DIR)/$(TARGET_BOX)-win64/
endif
ifeq ($(LINUX_USER_INS_DIR), )
PLAT_LINUX_PUBLISH_DIR := $(INSTALL_ROOT)/drivers/$(CPU_LINUX_DIR)/$(TARGET_BOX)-linux/
else
PLAT_LINUX_PUBLISH_DIR := $(INSTALL_ROOT)/$(LINUX_USER_INS_DIR)/$(CPU_LINUX_DIR)/$(TARGET_BOX)-linux/
endif
PLAT_R16_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_R16_DIR)/$(TARGET_BOX)-r16/
PLAT_R311_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_R16_DIR)/$(TARGET_BOX)-r311/
ifeq ($(WIN32_USER_INS_DIR), )
PLAT_WIN32_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_WIN32_DIR)/$(TARGET_BOX)-win32/
PLAT_WIN64_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_WIN64_DIR)/$(TARGET_BOX)-win64/
else
PLAT_WIN32_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(WIN32_USER_INS_DIR).debug/$(CPU_WIN32_DIR)/$(TARGET_BOX)-win32/
PLAT_WIN64_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(WIN64_USER_INS_DIR).debug/$(CPU_WIN64_DIR)/$(TARGET_BOX)-win64/
endif
ifeq ($(LINUX_USER_INS_DIR), )
PLAT_LINUX_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/drivers.debug/$(CPU_LINUX_DIR)/$(TARGET_BOX)-linux/
else
PLAT_LINUX_PUBLISH_DEBUG_DIR := $(INSTALL_ROOT)/$(LINUX_USER_INS_DIR).debug/$(CPU_LINUX_DIR)/$(TARGET_BOX)-linux/
endif
endif
endif
ifneq ($(TARGET_IDK_USER_ITEMS), )
TARGET_IDK_USER_ITEMS_DIR := $(INSTALL_ROOT)/idk/$(TARGET_NAME)/
endif
# Actual build targets
#BUILD_TARGET += $(SUB_TARGETS)
BUILD_TARGET :=
ifneq ($(UNMAKE_PROCESS), TRUE)
PLAT_R16_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-r16$(TARGET_EXT)
PLAT_R311_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-r311$(TARGET_EXT)
PLAT_LINUX_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-linux$(TARGET_EXT)
PLAT_WIN32_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-win32$(TARGET_EXT_WIN)
PLAT_WIN32_LIB_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-win32.lib
PLAT_WIN64_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-win64$(TARGET_EXT_WIN)
ifeq ($(PLAT_R16), TRUE)
BUILD_TARGET += $(PLAT_R16_TARGET)
PLAT_R16_CFLAGS += -DPLATFORM_R16 $(R16_EXTFLAG)
PLAT_R16_LDFLAGS += $(R16_DRV_LDFLAGS)
PLAT_R16_LIBFLAGS := $(R16_LIBFLAGS)
PLAT_R16_LIBS := $(R16_LIBS)
endif
ifeq ($(PLAT_R311), TRUE)
BUILD_TARGET += $(PLAT_R311_TARGET)
PLAT_R311_CFLAGS += -DPLATFORM_R311 $(R311_EXTFLAG)
PLAT_R311_LDFLAGS += $(R311_DRV_LDFLAGS)
PLAT_R311_LIBFLAGS := $(R311_LIBFLAGS)
PLAT_R311_LIBS := $(R311_LIBS)
endif
# linux board
ifeq ($(PLAT_LINUX), TRUE)
BUILD_TARGET += $(PLAT_LINUX_TARGET)
PLAT_LINUX_CFLAGS += -DPLATFORM_CPU $(LINUX_EXTFLAG)
PLAT_LINUX_LDFLAGS +=
PLAT_LINUX_LIBFLAGS := $(LINUX_LIBFLAGS)
PLAT_LINUX_LIBS := $(LINUX_LIBS)
endif
# win32 board
ifeq ($(PLAT_WIN32), TRUE)
BUILD_TARGET += $(PLAT_WIN32_TARGET)
PLAT_WIN32_CFLAGS += -DWIN32 -DPLATFORM_CPU $(WIN32_EXTFLAG)
PLAT_WIN32_LDFLAGS +=
PLAT_WIN32_LIBFLAGS := $(WIN32_LIBFLAGS)
PLAT_WIN32_LIBS := $(WIN32_LIBS)
endif
# win64 board
ifeq ($(PLAT_WIN64), TRUE)
BUILD_TARGET += $(WIN64_TARGET)
PLAT_WIN64_CFLAGS += -m64 -D_AMD64_=1 -DWIN64 -DWIN32 -DPLATFORM_CPU $(WIN64_EXTFLAG)
PLAT_WIN64_LDFLAGS += -m64
PLAT_WIN64_LIBFLAGS := $(WIN64_LIBFLAGS)
PLAT_WIN64_LIBS := $(WIN64_LIBS)
endif
# CC : Cross Build Tools
# LD : Cross Link Tools
CC := gcc
OBJCOPY := objcopy
STRIP := strip
AR := ar
R16_CROSS_CC := arm-openwrt-linux-gcc
R16_CROSS_OBJCOPY := arm-openwrt-linux-objcopy
R16_CROSS_STRIP := arm-openwrt-linux-strip
R16_CROSS_AR := arm-openwrt-linux-ar
R16_CROSS_AS := arm-openwrt-linux-as
R311_CROSS_CC := arm-openwrt-linux-muslgnueabi-gcc
R311_CROSS_OBJCOPY := arm-openwrt-linux-muslgnueabi-objcopy
R311_CROSS_STRIP := arm-openwrt-linux-muslgnueabi-strip
R311_CROSS_AR := arm-openwrt-linux-muslgnueabi-ar
R311_CROSS_AS := arm-openwrt-linux-muslgnueabi-as
WIN32_CROSS_CC := i686-w64-mingw32-gcc
WIN32_CROSS_AR := i686-w64-mingw32-ar
WIN32_CROSS_DLLTOOL := i686-w64-mingw32-dlltool
WIN32_CROSS_LD := i686-w64-mingw32-gcc
WIN32_CROSS_OBJCOPY := i686-w64-mingw32-objcopy
WIN32_CROSS_STRIP := i686-w64-mingw32-strip
WIN64_CROSS_CC := x86_64-w64-mingw32-gcc
WIN64_CROSS_AR := x86_64-w64-mingw32-ar
WIN64_CROSS_LD := x86_64-w64-mingw32-gcc
WIN64_CROSS_OBJCOPY := x86_64-w64-mingw32-objcopy
WIN64_CROSS_STRIP := x86_64-w64-mingw32-strip
ifeq ($(TARGET_TYPE), KO)
R16_CROSS_LD := arm-openwrt-linux-ld
R311_CROSS_LD := arm-openwrt-linux-muslgnueabi-ld
else
R16_CROSS_LD := $(R16_CROSS_CC)
R311_CROSS_LD := $(R311_CROSS_CC)
endif
ifeq ($(PLAT_R16), TRUE)
PLAT_R16_OBJS := $(PLAT_R16_SRCS:%.c=$(PLAT_R16_DIR)/%.o)
PLAT_R16_OBJS += $(PLAT_R16_AS_SRCS:%.s=$(PLAT_R16_DIR)/%.o)
PLAT_R16_DEPS := $(PLAT_R16_SRCS:%.c=$(PLAT_R16_DIR)/%.d)
else
PLAT_R16_OBJS :=
PLAT_R16_DEPS :=
endif
ifeq ($(PLAT_R311), TRUE)
PLAT_R311_OBJS := $(PLAT_R311_SRCS:%.c=$(PLAT_R311_DIR)/%.o)
PLAT_R311_OBJS += $(PLAT_R311_AS_SRCS:%.s=$(PLAT_R311_DIR)/%.o)
PLAT_R311_DEPS := $(PLAT_R311_SRCS:%.c=$(PLAT_R311_DIR)/%.d)
else
PLAT_R311_OBJS :=
PLAT_R311_DEPS :=
endif
ifeq ($(PLAT_LINUX), TRUE)
PLAT_LINUX_OBJS := $(PLAT_LINUX_SRCS:%.c=$(PLAT_LINUX_DIR)/%.o)
PLAT_LINUX_OBJS += $(PLAT_LINUX_AS_SRCS:%.s=$(PLAT_LINUX_DIR)/%.o)
PLAT_LINUX_DEPS := $(PLAT_LINUX_SRCS:%.c=$(PLAT_LINUX_DIR)/%.d)
else
PLAT_LINUX_OBJS :=
PLAT_LINUX_DEPS :=
endif
ifeq ($(PLAT_WIN32), TRUE)
PLAT_WIN32_OBJS := $(PLAT_WIN32_SRCS:%.c=$(PLAT_WIN32_DIR)/%.o)
PLAT_WIN32_OBJS += $(PLAT_WIN32_AS_SRCS:%.s=$(PLAT_WIN32_DIR)/%.o)
PLAT_WIN32_DEPS := $(PLAT_WIN32_SRCS:%.c=$(PLAT_WIN32_DIR)/%.d)
else
PLAT_WIN32_OBJS :=
PLAT_WIN32_DEPS :=
endif
ifeq ($(PLAT_WIN64), TRUE)
PLAT_WIN64_OBJS := $(PLAT_WIN64_SRCS:%.c=$(PLAT_WIN64_DIR)/%.o)
PLAT_WIN64_OBJS += $(PLAT_WIN64_AS_SRCS:%.s=$(PLAT_WIN64_DIR)/%.o)
PLAT_WIN64_DEPS := $(PLAT_WIN64_SRCS:%.c=$(PLAT_WIN64_DIR)/%.d)
else
PLAT_WIN64_OBJS :=
PLAT_WIN64_DEPS :=
endif
ALL_OBJS += $(PLAT_R16_OBJS) $(PLAT_LINUX_OBJS) $(PLAT_WIN32_OBJS) $(PLAT_WIN64_OBJS)
ALL_DEPS += $(PLAT_R16_DEPS) $(PLAT_LINUX_DEPS) $(PLAT_WIN32_DEPS) $(PLAT_WIN64_DEPS)
ifneq ($(MAKECMDGOALS), clean)
ifneq ($(MAKECMDGOALS), cleanall)
ifneq ($(strip $(ALL_DEPS)),)
-include $(ALL_DEPS)
endif
endif
endif
# ifneq $(UNMAKE_PROCESS)
endif
ifeq ($(UNMAKE_PROCESS), TRUE)
BUILD_TARGET :=
endif
ifneq ($(OPT), clean)
ifneq ($(OPT), install)
ifneq ($(MAKECMDGOALS), clean)
ifneq ($(MAKECMDGOALS), cleanall)
ifeq ($(MAKE_TARGET), )
$(info ---------------------------------------------------------------------)
$(info | CPU | TYPE | OBJECT | Command | Source/Target |)
$(info ---------------------------------------------------------------------)
else
$(info ------------------------------------------------------------------------------)
$(info | Name | CPU | TYPE | OBJECT | Command | Source |)
$(info ------------------------------------------------------------------------------)
endif
endif
endif
endif
endif
.PHONY : all
all: $(BUILD_TARGET)
# Build R16
ifeq ($(PLAT_R16), TRUE)
$(PLAT_R16_TARGET): $(PLAT_R16_OBJS)
-@test -d $(TARGET_OUT_DIR) || $(MKDIR) $(TARGET_OUT_DIR)
ifeq ($(TARGET_TYPE), LIB)
@echo -e "$(PLAT_R16_COLOR) AR $@"
@$(R16_CROSS_AR) $(PLAT_R16_LIBFLAGS) $(TARGET_OUT_DIR)$@ $+ $(PLAT_R16_LIBS)
else
@echo -e "$(PLAT_R16_COLOR) LD $@"
@$(R16_CROSS_LD) -o $(TARGET_OUT_DIR)$@ $(PLAT_R16_LDFLAGS) $+ $(PLAT_R16_LIBS)
ifeq ($(TARGET_STRIP), TRUE)
@echo -e "$(PLAT_R16_COLOR) OBJCOPY $@.debug"
@$(R16_CROSS_OBJCOPY) --only-keep-debug $(TARGET_OUT_DIR)$@ $(TARGET_OUT_DIR)/$@.debug
@echo -e "$(PLAT_R16_COLOR) STRIP $@"
@$(R16_CROSS_STRIP) -g $(TARGET_OUT_DIR)$@
@echo -e "$(PLAT_R16_COLOR) OBJCOPY $@"
@$(R16_CROSS_OBJCOPY) --add-gnu-debuglink=$(TARGET_OUT_DIR)$@.debug $(TARGET_OUT_DIR)$@
endif
endif
$(PLAT_R16_DIR)/%.o : %.c
-@test -d $(dir $@) || $(MKDIR) $(dir $@)
@echo -e "$(PLAT_R16_COLOR) CC $<"
@$(R16_CROSS_CC) -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $< $(PLAT_R16_CFLAGS)
$(PLAT_R16_DIR)/%.o : %.s
@echo -e "$(PLAT_R16_COLOR) CC $<"
@$(R16_CROSS_CC) -c $< -o $@
endif
ifeq ($(PLAT_R311), TRUE)
$(PLAT_R311_TARGET): $(PLAT_R311_OBJS)
-@test -d $(TARGET_OUT_DIR) || $(MKDIR) $(TARGET_OUT_DIR)
ifeq ($(TARGET_TYPE), LIB)
@echo -e "$(PLAT_R311_COLOR) AR $@"
@$(R311_CROSS_AR) $(PLAT_R311_LIBFLAGS) $(TARGET_OUT_DIR)$@ $+ $(PLAT_R311_LIBS)
else
@echo -e "$(PLAT_R311_COLOR) LD $@"
@$(R311_CROSS_LD) -o $(TARGET_OUT_DIR)$@ $(PLAT_R311_LDFLAGS) $+ $(PLAT_R311_LIBS)
ifeq ($(TARGET_STRIP), TRUE)
@echo -e "$(PLAT_R311_COLOR) OBJCOPY $@.debug"
@$(R311_CROSS_OBJCOPY) --only-keep-debug $(TARGET_OUT_DIR)$@ $(TARGET_OUT_DIR)/$@.debug
@echo -e "$(PLAT_R311_COLOR) STRIP $@"
@$(R311_CROSS_STRIP) -g $(TARGET_OUT_DIR)$@
@echo -e "$(PLAT_R311_COLOR) OBJCOPY $@"
@$(R311_CROSS_OBJCOPY) --add-gnu-debuglink=$(TARGET_OUT_DIR)$@.debug $(TARGET_OUT_DIR)$@
endif
endif
$(PLAT_R311_DIR)/%.o : %.c
-@test -d $(dir $@) || $(MKDIR) $(dir $@)
@echo -e "$(PLAT_R311_COLOR) CC $<"
@$(R311_CROSS_CC) -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $< $(PLAT_R311_CFLAGS)
$(PLAT_R311_DIR)/%.o : %.s
@echo -e "$(PLAT_R311_COLOR) CC $<"
@$(R311_CROSS_CC) -c $< -o $@
endif
# Build LINUX Board
ifeq ($(PLAT_LINUX), TRUE)
$(PLAT_LINUX_TARGET): $(PLAT_LINUX_OBJS)
-@test -d $(TARGET_OUT_DIR) || $(MKDIR) $(TARGET_OUT_DIR)
ifeq ($(TARGET_TYPE), LIB)
@echo -e "$(PLAT_LINUX_COLOR) AR $@"
@$(AR) $(PLAT_LINUX_LIBFLAGS) $(TARGET_OUT_DIR)$@ $+ $(PLAT_LINUX_LIBS)
else
@echo -e "$(PLAT_LINUX_COLOR) LD $@"
@$(CC) -o $(TARGET_OUT_DIR)$@ $(PLAT_LINUX_LDFLAGS) $+ $(PLAT_LINUX_LIBS)
ifeq ($(TARGET_STRIP), TRUE)
@echo -e "$(PLAT_LINUX_COLOR) OBJCOPY $@.debug"
@$(OBJCOPY) --only-keep-debug $(TARGET_OUT_DIR)$@ $(TARGET_OUT_DIR)$@.debug
@echo -e "$(PLAT_LINUX_COLOR) STRIP $@"
@$(STRIP) -g $(TARGET_OUT_DIR)$@
@echo -e "$(PLAT_LINUX_COLOR) OBJCOPY $@"
@$(OBJCOPY) --add-gnu-debuglink=$(TARGET_OUT_DIR)$@.debug $(TARGET_OUT_DIR)$@
endif
endif
$(PLAT_LINUX_DIR)/%.o : %.c
-@test -d $(dir $@) || $(MKDIR) $(dir $@)
@echo -e "$(PLAT_LINUX_COLOR) CC $<"
@$(CC) -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $< $(PLAT_LINUX_CFLAGS)
endif
# Build WIN32 Board
ifeq ($(PLAT_WIN32), TRUE)
$(PLAT_WIN32_TARGET): $(PLAT_WIN32_OBJS)
-@test -d $(TARGET_OUT_DIR) || $(MKDIR) $(TARGET_OUT_DIR)
ifeq ($(TARGET_TYPE), LIB)
@echo -e "$(PLAT_WIN32_COLOR) AR $@"
@$(WIN32_CROSS_AR) $(PLAT_WIN32_LIBFLAGS) $(TARGET_OUT_DIR)$@ $+ $(PLAT_WIN32_LIBS)
else
@echo -e "$(PLAT_WIN32_COLOR) LD $@"
$(WIN32_CROSS_CC) -o $(TARGET_OUT_DIR)$@ $+ $(PLAT_WIN32_LDFLAGS) $(PLAT_WIN32_LIBS)
ifeq ($(TARGET_STRIP), TRUE)
@echo -e "$(PLAT_WIN32_COLOR) OBJCOPY $@.debug"
@$(WIN32_CROSS_OBJCOPY) --only-keep-debug $(TARGET_OUT_DIR)$@ $(TARGET_OUT_DIR)$@.debug
@echo -e "$(PLAT_WIN32_COLOR) STRIP $@"
@$(WIN32_CROSS_STRIP) -g $(TARGET_OUT_DIR)$@
@echo -e "$(PLAT_WIN32_COLOR) OBJCOPY $@"
@$(WIN32_CROSS_OBJCOPY) --add-gnu-debuglink=$(TARGET_OUT_DIR)$@.debug $(TARGET_OUT_DIR)$@
endif
ifeq ($(TARGET_TYPE), SDK)
ifneq ($(PLAT_WIN32_DEF_FILE), )
@echo -e "$(PLAT_WIN32_COLOR) DLLTOOL $(PLAT_WIN32_LIB_TARGET)"
@$(WIN32_CROSS_DLLTOOL) -d $(PLAT_WIN32_DEF_FILE) --dllname $(TARGET_OUT_DIR)$(PLAT_WIN32_TARGET) --output-lib $(TARGET_OUT_DIR)$(PLAT_WIN32_LIB_TARGET) --kill-at
endif
endif
endif
$(PLAT_WIN32_DIR)/%.o : %.c
-@test -d $(dir $@) || $(MKDIR) $(dir $@)
@echo -e "$(PLAT_WIN32_COLOR) CC $<"
@$(WIN32_CROSS_CC) -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $< $(PLAT_WIN32_CFLAGS)
endif
# Build WIN64 Board
ifeq ($(PLAT_WIN64), TRUE)
$(PLAT_WIN64_TARGET): $(PLAT_WIN64_OBJS)
ifeq ($(TARGET_TYPE), LIB)
@echo -e "$(PLAT_WIN64_COLOR) AR $@"
@$(WIN64_CROSS_AR) $(PLAT_WIN64_LIBFLAGS) $@ $+ $(PLAT_WIN64_LIBS)
else
@echo -e "$(PLAT_WIN64_COLOR) LD $@"
@$(WIN64_CROSS_CC) -o $@ $+ $(PLAT_WIN64_LDFLAGS) $(PLAT_WIN64_LIBS)
ifeq ($(TARGET_STRIP), TRUE)
@echo -e "$(PLAT_WIN64_COLOR) OBJCOPY $@.debug"
@$(WIN64_CROSS_OBJCOPY) --only-keep-debug $@ $@.debug
@echo -e "$(WIN64_COLOR) STRIP $@"
@$(WIN64_CROSS_STRIP) -g $@
@echo -e "$(WIN64_COLOR) OBJCOPY $@"
@$(WIN64_CROSS_OBJCOPY) --add-gnu-debuglink=$@.debug $@
endif
endif
$(PLAT_WIN64_DIR)/%.o : %.c
-@test -d $(dir $@) || $(MKDIR) $(dir $@)
@echo -e "$(PLAT_WIN64_COLOR) CC $<"
@$(WIN64_CROSS_CC) -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $< $(PLAT_WIN64_CFLAGS)
endif
.PHONY : install
install:
ifeq ($(INSTALL_ROOT), )
$(error usage: make install DIR=<path>)
endif
# install custom IDK files to idk directory
ifneq ($(TARGET_IDK_USER_ITEMS), )
-@test -d $(TARGET_IDK_USER_ITEMS_DIR) || $(MKDIR) $(TARGET_IDK_USER_ITEMS_DIR)
@echo -e "$(INSTALL_IDK_ITEM_COLOR) $(MAKECMD_COLOR) $(notdir $(TARGET_IDK_USER_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(TARGET_IDK_USER_ITEMS) $(TARGET_IDK_USER_ITEMS_DIR)
endif
ifneq ($(PLAT_R16_DONT_INSTALL), TRUE)
# R16 targets install
ifeq ($(PLAT_R16), TRUE)
-@test -d $(PLAT_R16_PUBLISH_DIR) || $(MKDIR) $(PLAT_R16_PUBLISH_DIR)
-@test -d $(PLAT_R16_PUBLISH_DEBUG_DIR) || $(MKDIR) $(PLAT_R16_PUBLISH_DEBUG_DIR)
ifneq ($(UNMAKE_PROCESS), TRUE)
@echo -e "$(INSTALL_COLOR) $(PLAT_R16_COLOR) $(TARGET_OUT_DIR)$(PLAT_R16_TARGET) $(PLAT_R16_TARGET).debug $(INSTALL_PATH_COLOR)"
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_R16_TARGET) $(PLAT_R16_PUBLISH_DIR)
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_R16_TARGET).debug $(PLAT_R16_PUBLISH_DEBUG_DIR)
endif
ifneq ($(PLAT_R16_USER_INS_ITEMS), )
@echo -e "$(INSTALL_USER_ITEM_COLOR) $(PLAT_R16_COLOR) $(notdir $(PLAT_R16_USER_INS_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(PLAT_R16_USER_INS_ITEMS) $(PLAT_R16_PUBLISH_DIR)
endif
endif
endif
ifneq ($(PLAT_R311_DONT_INSTALL), TRUE)
# R311 targets install
ifeq ($(PLAT_R311), TRUE)
-@test -d $(PLAT_R311_PUBLISH_DIR) || $(MKDIR) $(PLAT_R311_PUBLISH_DIR)
-@test -d $(PLAT_R311_PUBLISH_DEBUG_DIR) || $(MKDIR) $(PLAT_R311_PUBLISH_DEBUG_DIR)
ifneq ($(UNMAKE_PROCESS), TRUE)
@echo -e "$(INSTALL_COLOR) $(PLAT_R311_COLOR) $(TARGET_OUT_DIR)$(PLAT_R311_TARGET) $(PLAT_R311_TARGET).debug $(INSTALL_PATH_COLOR)"
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_R311_TARGET) $(PLAT_R311_PUBLISH_DIR)
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_R311_TARGET).debug $(PLAT_R311_PUBLISH_DEBUG_DIR)
endif
ifneq ($(PLAT_R311_USER_INS_ITEMS), )
@echo -e "$(INSTALL_USER_ITEM_COLOR) $(PLAT_R311_COLOR) $(notdir $(PLAT_R311_USER_INS_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(PLAT_R311_USER_INS_ITEMS) $(PLAT_R311_PUBLISH_DIR)
endif
endif
endif
ifneq ($(PLAT_LINUX_DONT_INSTALL), TRUE)
# LINUX board targets install
ifeq ($(PLAT_LINUX), TRUE)
-@test -d $(PLAT_LINUX_PUBLISH_DIR) || $(MKDIR) $(PLAT_LINUX_PUBLISH_DIR)
-@test -d $(PLAT_LINUX_PUBLISH_DEBUG_DIR) || $(MKDIR) $(PLAT_LINUX_PUBLISH_DEBUG_DIR)
ifneq ($(UNMAKE_PROCESS), TRUE)
@echo -e "$(INSTALL_COLOR) $(PLAT_LINUX_COLOR) $(TARGET_OUT_DIR)$(PLAT_LINUX_TARGET) $(PLAT_LINUX_TARGET).debug $(INSTALL_PATH_COLOR)"
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_LINUX_TARGET) $(PLAT_LINUX_PUBLISH_DIR)
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_LINUX_TARGET).debug $(PLAT_LINUX_PUBLISH_DEBUG_DIR)
endif
ifneq ($(PLAT_LINUX_USER_INS_ITEMS), )
@echo -e "$(INSTALL_USER_ITEM_COLOR) $(PLAT_LINUX_COLOR) $(notdir $(PLAT_LINUX_USER_INS_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(PLAT_LINUX_USER_INS_ITEMS) $(PLAT_LINUX_PUBLISH_DIR)
endif
ifneq ($(USER_MULTILE_PLATFORM_HEAD_ITEMS), )
@echo -e "$(INSTALL_MULT_PLAT_COLOR) $(PLAT_LINUX_COLOR) $(notdir $(USER_MULTILE_PLATFORM_HEAD_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(USER_MULTILE_PLATFORM_HEAD_ITEMS) $(SDK_HEADFILE_PUBLIST_DIR)
endif
endif
endif
ifneq ($(PLAT_WIN32_DONT_INSTALL), TRUE)
# WIN32 board targets install
ifeq ($(PLAT_WIN32), TRUE)
ifneq ($(PLAT_WIN32_PRE_INSTALL), )
@echo -e "$(PRE_INSTALL_COLOR) $(PLAT_WIN32_COLOR) Running $(PLAT_WIN32_PRE_INSTALL) shell script"
@sh $(PLAT_WIN32_PRE_INSTALL)
@echo -e "$(PRE_INSTALL_COLOR) $(PLAT_WIN32_COLOR) Running $(PLAT_WIN32_PRE_INSTALL) shell script complete"
endif
-@test -d $(PLAT_WIN32_PUBLISH_DIR) || $(MKDIR) $(PLAT_WIN32_PUBLISH_DIR)
-@test -d $(PLAT_WIN32_PUBLISH_DEBUG_DIR) || $(MKDIR) $(PLAT_WIN32_PUBLISH_DEBUG_DIR)
ifneq ($(UNMAKE_PROCESS), TRUE)
@echo -e "$(INSTALL_COLOR) $(PLAT_WIN32_COLOR) $(PLAT_WIN32_TARGET) $(PLAT_WIN32_TARGET).debug $(INSTALL_PATH_COLOR)"
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_WIN32_TARGET) $(PLAT_WIN32_PUBLISH_DIR)
@$(CP) $(TARGET_OUT_DIR)/$(PLAT_WIN32_TARGET).debug $(PLAT_WIN32_PUBLISH_DEBUG_DIR)
endif
ifneq ($(PLAT_WIN32_USER_INS_ITEMS), )
@echo -e "$(INSTALL_USER_ITEM_COLOR) $(PLAT_WIN32_COLOR) $(notdir $(PLAT_WIN32_USER_INS_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(PLAT_WIN32_USER_INS_ITEMS) $(PLAT_WIN32_PUBLISH_DIR)
endif
ifneq ($(USER_MULTILE_PLATFORM_HEAD_ITEMS), )
@echo -e "$(INSTALL_MULT_PLAT_COLOR) $(PLAT_WIN32_COLOR) $(notdir $(USER_MULTILE_PLATFORM_HEAD_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(USER_MULTILE_PLATFORM_HEAD_ITEMS) $(SDK_HEADFILE_PUBLIST_DIR)
endif
endif
endif
ifneq ($(PLAT_WIN64_DONT_INSTALL), TRUE)
# WIN64 board targets install
ifeq ($(PLAT_WIN64), TRUE)
ifneq ($(PLAT_WIN64_PRE_INSTALL), )
@echo -e "$(PRE_INSTALL_COLOR) $(PLAT_WIN64_COLOR) Running $(PLAT_WIN64_PRE_INSTALL) shell script"
@sh $(PLAT_WIN64_PRE_INSTALL)
@echo -e "$(PRE_INSTALL_COLOR) $(PLAT_WIN64_COLOR) Running $(PLAT_WIN64_PRE_INSTALL) shell script complete"
endif
-@test -d $(PLAT_WIN64_PUBLISH_DIR) || $(MKDIR) $(PLAT_WIN64_PUBLISH_DIR)
-@test -d $(PLAT_WIN64_PUBLISH_DEBUG_DIR) || $(MKDIR) $(PLAT_WIN64_PUBLISH_DEBUG_DIR)
ifneq ($(UNMAKE_PROCESS), TRUE)
@echo -e "$(INSTALL_COLOR) $(PLAT_WIN64_COLOR) $(PLAT_WIN64_TARGET) $(PLAT_WIN64_TARGET).debug $(INSTALL_PATH_COLOR)"
@$(CP) $(PLAT_WIN64_TARGET) $(PLAT_WIN64_PUBLISH_DIR)
@$(CP) $(PLAT_WIN64_TARGET).debug $(PLAT_WIN64_PUBLISH_DEBUG_DIR)
endif
ifneq ($(PLAT_WIN64_USER_INS_ITEMS), )
@echo -e "$(INSTALL_USER_ITEM_COLOR) $(PLAT_WIN64_COLOR) $(notdir $(PLAT_WIN64_USER_INS_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(PLAT_WIN64_USER_INS_ITEMS) $(PLAT_WIN64_PUBLISH_DIR)
endif
ifneq ($(USER_MULTILE_PLATFORM_HEAD_ITEMS), )
@echo -e "$(INSTALL_MULT_PLAT_COLOR) $(PLAT_WIN64_COLOR) $(notdir $(USER_MULTILE_PLATFORM_HEAD_ITEMS)) $(INSTALL_PATH_COLOR)"
@$(CP) $(USER_MULTILE_PLATFORM_HEAD_ITEMS) $(SDK_HEADFILE_PUBLIST_DIR)
endif
endif
endif
# end of ($(DONT_INSTALL), TRUE)
.PHONY : cleanall
cleanall:
@echo -e "$(CLEAN_COLOR) $(PATH_COLOR) $(OUTPUT_DIR) $(BUILD_TARGET) $(USER_CLEAN_ITEMS) $(notdir $(DEPEND_LIB)) $(TARGET_OUT_DIR) *.debug"
@-$(RM) $(TARGET_OUT_DIR) $(OUTPUT_DIR) $(BUILD_TARGET) $(notdir $(DEPEND_LIB)) $(USER_CLEAN_ITEMS) *.debug
.PHONY : clean
clean:
@echo -e "$(CLEAN_COLOR) $(PATH_COLOR) $(ALL_OBJS) $(BUILD_TARGET) $(ALL_DEPS) $(USER_CLEAN_ITEMS) $(notdir $(DEPEND_LIB)) $(TARGET_OUT_DIR) *.debug"
@-$(RM) $(TARGET_OUT_DIR) $(ALL_OBJS) $(BUILD_TARGET) $(ALL_DEPS) $(USER_CLEAN_ITEMS) $(notdir $(DEPEND_LIB)) *.debug