19d041268SAndrew Victor# 29d041268SAndrew Victor# Makefile for the linux kernel. 39d041268SAndrew Victor# 4598e0855SAlexandre Belloniobj-y := soc.o 59d041268SAndrew Victor 69d041268SAndrew Victor# CPU-specific support 7b53cdd03SAlexandre Belloniobj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o 8cac01723SNicolas Ferreobj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o 9cac01723SNicolas Ferreobj-$(CONFIG_SOC_SAMA5) += sama5.o 108f4b4794SLudovic Desroches 11b7b272a8SAndrew Victor# Power Management 12b7b272a8SAndrew Victorobj-$(CONFIG_PM) += pm.o 13828b98faSWenyou Yangobj-$(CONFIG_PM) += pm_suspend.o 149d041268SAndrew Victor 15176a1b3dSAlexandre Belloniifeq ($(CONFIG_CPU_V7),y) 16176a1b3dSAlexandre BelloniAFLAGS_pm_suspend.o := -march=armv7-a 17176a1b3dSAlexandre Belloniendif 189d041268SAndrew Victorifeq ($(CONFIG_PM_DEBUG),y) 199d041268SAndrew VictorCFLAGS_pm.o += -DDEBUG 209d041268SAndrew Victorendif 2165cc1a59SAlexandre Belloni 2265cc1a59SAlexandre Belloni# Default sed regexp - multiline due to syntax constraints 2365cc1a59SAlexandre Bellonidefine sed-y 2465cc1a59SAlexandre Belloni "/^->/{s:->#\(.*\):/* \1 */:; \ 2565cc1a59SAlexandre Belloni s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ 2665cc1a59SAlexandre Belloni s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ 2765cc1a59SAlexandre Belloni s:->::; p;}" 2865cc1a59SAlexandre Belloniendef 2965cc1a59SAlexandre Belloni 3065cc1a59SAlexandre Belloni# Use filechk to avoid rebuilds when a header changes, but the resulting file 3165cc1a59SAlexandre Belloni# does not 3265cc1a59SAlexandre Bellonidefine filechk_offsets 3365cc1a59SAlexandre Belloni (set -e; \ 3465cc1a59SAlexandre Belloni echo "#ifndef $2"; \ 3565cc1a59SAlexandre Belloni echo "#define $2"; \ 3665cc1a59SAlexandre Belloni echo "/*"; \ 3765cc1a59SAlexandre Belloni echo " * DO NOT MODIFY."; \ 3865cc1a59SAlexandre Belloni echo " *"; \ 3965cc1a59SAlexandre Belloni echo " * This file was generated by Kbuild"; \ 4065cc1a59SAlexandre Belloni echo " */"; \ 4165cc1a59SAlexandre Belloni echo ""; \ 4265cc1a59SAlexandre Belloni sed -ne $(sed-y); \ 4365cc1a59SAlexandre Belloni echo ""; \ 4465cc1a59SAlexandre Belloni echo "#endif" ) 4565cc1a59SAlexandre Belloniendef 4665cc1a59SAlexandre Belloni 4765cc1a59SAlexandre Belloniarch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c 4865cc1a59SAlexandre Belloni $(call if_changed_dep,cc_s_c) 4965cc1a59SAlexandre Belloni 5065cc1a59SAlexandre Belloniinclude/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE 5165cc1a59SAlexandre Belloni $(call filechk,offsets,__PM_DATA_OFFSETS_H__) 5265cc1a59SAlexandre Belloni 5365cc1a59SAlexandre Belloniarch/arm/mach-at91/pm_suspend.o: include/generated/at91_pm_data-offsets.h 54