From 0ef13176c154e27949f6f13545caceb3cd805564 Mon Sep 17 00:00:00 2001 From: XiNGRZ Date: Fri, 23 Sep 2016 11:52:42 +0800 Subject: [PATCH] nexell: Fix compiling failure with 'O=' parameter While compiling with 'make O=' to specific an output directory, for example, compiling with CM, it may failed with errors like: fatal error: opening dependency file drivers/media/video/nexell/out/ hdmi-new/cec/.nxp-hdmi-cec.o.d: No such file or directory This resolve the problem by splitting their Makefiles into their subdirs. --- arch/arm/mach-s5p6818/Makefile | 12 ++-- arch/arm/mach-s5p6818/prototype.mk | 69 ------------------- arch/arm/mach-s5p6818/prototype/Makefile | 25 +++++++ arch/arm/mach-s5p6818/prototype/base/Makefile | 24 +++++++ .../mach-s5p6818/prototype/module/Makefile | 68 ++++++++++++++++++ drivers/media/video/nexell/out/Makefile | 1 - .../media/video/nexell/out/hdmi-new/Makefile | 1 + .../video/nexell/out/hdmi-new/cec/Makefile | 1 + 8 files changed, 123 insertions(+), 78 deletions(-) delete mode 100644 arch/arm/mach-s5p6818/prototype.mk create mode 100644 arch/arm/mach-s5p6818/prototype/Makefile create mode 100644 arch/arm/mach-s5p6818/prototype/base/Makefile create mode 100644 arch/arm/mach-s5p6818/prototype/module/Makefile create mode 100644 drivers/media/video/nexell/out/hdmi-new/cec/Makefile diff --git a/arch/arm/mach-s5p6818/Makefile b/arch/arm/mach-s5p6818/Makefile index 24c8c472020..2dfedc64f0d 100644 --- a/arch/arm/mach-s5p6818/Makefile +++ b/arch/arm/mach-s5p6818/Makefile @@ -17,15 +17,11 @@ obj-$(CONFIG_ANDROID_RAM_CONSOLE) += dev-ramcon.o #=============================================================================== # Support prototype #=============================================================================== -PROTOTYPE := prototype -MODULES := module -BASEDIR := base +obj-y += prototype/ -include $(srctree)/arch/arm/mach-s5p6818/$(PROTOTYPE).mk - -KBUILD_CFLAGS += -I$(srctree)/$(MACHINE)$(PROTOTYPE)/$(BASEDIR) \ - -I$(srctree)/$(MACHINE)$(PROTOTYPE)/$(MODULES) \ - -I$(srctree)/$(MACHINE)$(PROTOTYPE)/$(MODULES) +KBUILD_CFLAGS += \ + -I$(srctree)/$(MACHINE)prototype/base \ + -I$(srctree)/$(MACHINE)prototype/module ifeq ($(CONFIG_S5P6818_PROTO_RELEASE),y) KBUILD_CFLAGS += -D__LINUX__ -D__PRINTK__ -DNX_RELEASE diff --git a/arch/arm/mach-s5p6818/prototype.mk b/arch/arm/mach-s5p6818/prototype.mk deleted file mode 100644 index 8035c75f380..00000000000 --- a/arch/arm/mach-s5p6818/prototype.mk +++ /dev/null @@ -1,69 +0,0 @@ -# -# (C) Copyright 2009 -# jung hyun kim, Nexell Co, -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# - -obj-y += $(PROTOTYPE)/$(BASEDIR)/nx_bit_accessor.o - -obj-y += \ - $(PROTOTYPE)/$(MODULES)/nx_clkpwr.o \ - $(PROTOTYPE)/$(MODULES)/nx_rstcon.o \ - $(PROTOTYPE)/$(MODULES)/nx_tieoff.o \ - $(PROTOTYPE)/$(MODULES)/nx_mcus.o \ - $(PROTOTYPE)/$(MODULES)/nx_timer.o \ - $(PROTOTYPE)/$(MODULES)/nx_gpio.o \ - $(PROTOTYPE)/$(MODULES)/nx_alive.o \ - $(PROTOTYPE)/$(MODULES)/nx_clkgen.o \ - $(PROTOTYPE)/$(MODULES)/nx_ecid.o \ - $(PROTOTYPE)/$(MODULES)/nx_wdt.o - -obj-$(CONFIG_NXP_DISPLAY) += $(PROTOTYPE)/$(MODULES)/nx_displaytop.o \ - $(PROTOTYPE)/$(MODULES)/nx_disptop_clkgen.o \ - $(PROTOTYPE)/$(MODULES)/nx_dualdisplay.o \ - $(PROTOTYPE)/$(MODULES)/nx_mlc.o \ - $(PROTOTYPE)/$(MODULES)/nx_dpc.o - -obj-$(CONFIG_NXP_DISPLAY_LVDS) += $(PROTOTYPE)/$(MODULES)/nx_lvds.o -obj-$(CONFIG_NXP_DISPLAY_RESCONV) += $(PROTOTYPE)/$(MODULES)/nx_resconv.o -obj-$(CONFIG_NXP_DISPLAY_HDMI) += $(PROTOTYPE)/$(MODULES)/nx_hdmi.o -obj-$(CONFIG_NXP_DISPLAY_HDMI) += $(PROTOTYPE)/$(MODULES)/nx_ecid.o -obj-$(CONFIG_NXP_DISPLAY_MIPI) += $(PROTOTYPE)/$(MODULES)/nx_mipi.o - -obj-$(CONFIG_RTC_DRV_NXP) += $(PROTOTYPE)/$(MODULES)/nx_rtc.o - -obj-$(CONFIG_HAVE_PWM) += $(PROTOTYPE)/$(MODULES)/nx_pwm.o -obj-$(CONFIG_NXP_ADC) += $(PROTOTYPE)/$(MODULES)/nx_adc.o -obj-$(CONFIG_VIDEO_NXP_CAPTURE) += $(PROTOTYPE)/$(MODULES)/nx_vip.o -obj-$(CONFIG_SLSIAP_BACKWARD_CAMERA) += $(PROTOTYPE)/$(MODULES)/nx_vip.o -obj-$(CONFIG_NXP_OUT_HDMI) += $(PROTOTYPE)/$(MODULES)/nx_hdmi.o -obj-$(CONFIG_NXP_OUT_HDMI) += $(PROTOTYPE)/$(MODULES)/nx_ecid.o - -obj-$(CONFIG_NXP_M2M_SCALER) += $(PROTOTYPE)/$(MODULES)/nx_scaler.o -obj-$(CONFIG_NXP_CAPTURE_MIPI_CSI) += $(PROTOTYPE)/$(MODULES)/nx_mipi.o -obj-$(CONFIG_NXP_MP2TS_IF) += $(PROTOTYPE)/$(MODULES)/nx_mpegtsi.o - -obj-$(CONFIG_RTC_DRV_NXP) += $(PROTOTYPE)/$(MODULES)/nx_rtc.o - -obj-$(CONFIG_PPM_NXP) += $(PROTOTYPE)/$(MODULES)/nx_ppm.o -obj-$(CONFIG_SND_NXP_PDM) += $(PROTOTYPE)/$(MODULES)/nx_pdm.o -obj-$(CONFIG_SENSORS_NXP_TMU) += $(PROTOTYPE)/$(MODULES)/nx_tmu.o -obj-$(CONFIG_NXP_DISPLAY_TVOUT) += $(PROTOTYPE)/$(MODULES)/nx_hdmi.o -obj-$(CONFIG_NXP_M2M_DEINTERLACER) += $(PROTOTYPE)/$(MODULES)/nx_deinterlace.o diff --git a/arch/arm/mach-s5p6818/prototype/Makefile b/arch/arm/mach-s5p6818/prototype/Makefile new file mode 100644 index 00000000000..280726bb8be --- /dev/null +++ b/arch/arm/mach-s5p6818/prototype/Makefile @@ -0,0 +1,25 @@ +# +# (C) Copyright 2009 +# jung hyun kim, Nexell Co, +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +obj-y += base/ +obj-y += module/ diff --git a/arch/arm/mach-s5p6818/prototype/base/Makefile b/arch/arm/mach-s5p6818/prototype/base/Makefile new file mode 100644 index 00000000000..dce36bd1112 --- /dev/null +++ b/arch/arm/mach-s5p6818/prototype/base/Makefile @@ -0,0 +1,24 @@ +# +# (C) Copyright 2009 +# jung hyun kim, Nexell Co, +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +obj-y += nx_bit_accessor.o diff --git a/arch/arm/mach-s5p6818/prototype/module/Makefile b/arch/arm/mach-s5p6818/prototype/module/Makefile new file mode 100644 index 00000000000..4b494712cf1 --- /dev/null +++ b/arch/arm/mach-s5p6818/prototype/module/Makefile @@ -0,0 +1,68 @@ +# +# (C) Copyright 2009 +# jung hyun kim, Nexell Co, +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +obj-y += \ + nx_clkpwr.o \ + nx_rstcon.o \ + nx_tieoff.o \ + nx_mcus.o \ + nx_timer.o \ + nx_gpio.o \ + nx_alive.o \ + nx_clkgen.o \ + nx_ecid.o \ + nx_wdt.o + +obj-$(CONFIG_NXP_DISPLAY) += \ + nx_displaytop.o \ + nx_disptop_clkgen.o \ + nx_dualdisplay.o \ + nx_mlc.o \ + nx_dpc.o + +obj-$(CONFIG_NXP_DISPLAY_LVDS) += nx_lvds.o +obj-$(CONFIG_NXP_DISPLAY_RESCONV) += nx_resconv.o +obj-$(CONFIG_NXP_DISPLAY_HDMI) += nx_hdmi.o +obj-$(CONFIG_NXP_DISPLAY_HDMI) += nx_ecid.o +obj-$(CONFIG_NXP_DISPLAY_MIPI) += nx_mipi.o + +obj-$(CONFIG_RTC_DRV_NXP) += nx_rtc.o + +obj-$(CONFIG_HAVE_PWM) += nx_pwm.o +obj-$(CONFIG_NXP_ADC) += nx_adc.o +obj-$(CONFIG_VIDEO_NXP_CAPTURE) += nx_vip.o +obj-$(CONFIG_SLSIAP_BACKWARD_CAMERA) += nx_vip.o +obj-$(CONFIG_NXP_OUT_HDMI) += nx_hdmi.o +obj-$(CONFIG_NXP_OUT_HDMI) += nx_ecid.o + +obj-$(CONFIG_NXP_M2M_SCALER) += nx_scaler.o +obj-$(CONFIG_NXP_CAPTURE_MIPI_CSI) += nx_mipi.o +obj-$(CONFIG_NXP_MP2TS_IF) += nx_mpegtsi.o + +obj-$(CONFIG_RTC_DRV_NXP) += nx_rtc.o + +obj-$(CONFIG_PPM_NXP) += nx_ppm.o +obj-$(CONFIG_SND_NXP_PDM) += nx_pdm.o +obj-$(CONFIG_SENSORS_NXP_TMU) += nx_tmu.o +obj-$(CONFIG_NXP_DISPLAY_TVOUT) += nx_hdmi.o +obj-$(CONFIG_NXP_M2M_DEINTERLACER) += nx_deinterlace.o diff --git a/drivers/media/video/nexell/out/Makefile b/drivers/media/video/nexell/out/Makefile index 7fbe29782a2..cde23e9fd18 100644 --- a/drivers/media/video/nexell/out/Makefile +++ b/drivers/media/video/nexell/out/Makefile @@ -1,7 +1,6 @@ obj-$(CONFIG_VIDEO_NXP_OUT) += nxp-out.o nxp-mlc.o obj-$(CONFIG_NXP_OUT_RESOLUTION_CONVERTER) += nxp-resc.o sync-preset.o obj-$(CONFIG_NXP_OUT_HDMI) += hdmi-new/ -obj-$(CONFIG_NXP_HDMI_CEC) += hdmi-new/cec/nxp-hdmi-cec.o obj-$(CONFIG_NXP_OUT_TVOUT) += nxp-tvout.o #obj-$(CONFIG_NXP_OUT_HDMI) += hdmi/ #obj-$(CONFIG_NXP_OUT_HDMI) += hdmi-emul/ diff --git a/drivers/media/video/nexell/out/hdmi-new/Makefile b/drivers/media/video/nexell/out/hdmi-new/Makefile index 03647192418..c42847ae313 100644 --- a/drivers/media/video/nexell/out/hdmi-new/Makefile +++ b/drivers/media/video/nexell/out/hdmi-new/Makefile @@ -1,4 +1,5 @@ obj-y = nxp-hdmi.o +obj-$(CONFIG_NXP_HDMI_CEC) += cec/ EXTRA_CFLAGS += -Idrivers/media/video/nexell EXTRA_CFLAGS += -I$(srctree)/arch/arm/mach-s5p4418/prototype/base -I$(srctree)/arch/arm/mach-s5p4418/prototype/module diff --git a/drivers/media/video/nexell/out/hdmi-new/cec/Makefile b/drivers/media/video/nexell/out/hdmi-new/cec/Makefile new file mode 100644 index 00000000000..daa7a5255bb --- /dev/null +++ b/drivers/media/video/nexell/out/hdmi-new/cec/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_NXP_HDMI_CEC) += nxp-hdmi-cec.o