Commit f2d293d0f8b101c03184992a8b12bfafb5563bb8
Committed by
Tom Rini
1 parent
6825a95b0b
Exists in
master
and in
49 other branches
kbuild: delete temporary build scripts
We had switched to Kbuild. We do not need old build scripts any more. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Showing 3 changed files with 0 additions and 235 deletions Side-by-side Diff
rules.mk
1 | -# | |
2 | -# (C) Copyright 2006-2013 | |
3 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | -# | |
5 | -# SPDX-License-Identifier: GPL-2.0+ | |
6 | -# | |
7 | -######################################################################### | |
8 | - | |
9 | -_depend: $(obj)/.depend | |
10 | - | |
11 | -# Split the source files into two camps: those in the current directory, and | |
12 | -# those somewhere else. For the first camp we want to support CPPFLAGS_<fname> | |
13 | -# and for the second we don't / can't. | |
14 | -PWD_SRCS := $(foreach f,$(SRCS), $(if \ | |
15 | - $(filter $(if $(KBUILD_SRC),$(srctree)/)$(src)/$(notdir $f),$f), $f)) | |
16 | -OTHER_SRCS := $(filter-out $(PWD_SRCS),$(SRCS)) | |
17 | - | |
18 | -# This is a list of dependency files to generate | |
19 | -DEPS := $(basename $(addprefix $(obj)/.depend., $(notdir $(PWD_SRCS)))) | |
20 | - | |
21 | -# Join all the dependencies into a single file, in three parts | |
22 | -# 1 .Concatenate all the generated depend files together | |
23 | -# 2. Add in the deps from OTHER_SRCS which we couldn't process | |
24 | -# 3. Add in the HOSTSRCS | |
25 | -$(obj)/.depend: $(TOPDIR)/config.mk $(DEPS) $(OTHER_SRCS) \ | |
26 | - $(HOSTSRCS) | |
27 | - cat /dev/null $(DEPS) >$@ | |
28 | - @for f in $(OTHER_SRCS); do \ | |
29 | - g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ | |
30 | - $(CC) -M $(CPPFLAGS) -MQ $(obj)/$$g $$f >> $@ ; \ | |
31 | - done | |
32 | - @for f in $(HOSTSRCS); do \ | |
33 | - g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ | |
34 | - $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)/$$g $$f >> $@ ; \ | |
35 | - done | |
36 | - | |
37 | -MAKE_DEPEND = $(CC) -M $(CPPFLAGS) $(EXTRA_CPPFLAGS_DEP) \ | |
38 | - -MQ $(addsuffix .o,$(obj)$(basename $<)) $< >$@ | |
39 | - | |
40 | - | |
41 | -$(obj)/.depend.%: $(src)/%.c | |
42 | - $(MAKE_DEPEND) | |
43 | - | |
44 | -$(obj)/.depend.%: $(src)/%.S | |
45 | - $(MAKE_DEPEND) | |
46 | - | |
47 | -######################################################################### |
scripts/Makefile.build.tmp
1 | -# our default target | |
2 | -.PHONY: all | |
3 | -all: | |
4 | - | |
5 | -ifeq ($(CONFIG_TPL_BUILD),y) | |
6 | - src := $(patsubst tpl/%,%,$(obj)) | |
7 | -else | |
8 | - ifeq ($(CONFIG_SPL_BUILD),y) | |
9 | - src := $(patsubst spl/%,%,$(obj)) | |
10 | - else | |
11 | - src := $(obj) | |
12 | - endif | |
13 | -endif | |
14 | - | |
15 | -include $(srctree)/scripts/Kbuild.include | |
16 | -include $(srctree)/config.mk | |
17 | - | |
18 | -# variable LIB is used in examples/standalone/Makefile | |
19 | -__LIB := $(obj)/built-in.o | |
20 | -LIBGCC = $(obj)/libgcc.o | |
21 | -SRCS := | |
22 | -subdir-y := | |
23 | -obj-dirs := | |
24 | - | |
25 | -kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) | |
26 | -include $(kbuild-dir)/Makefile | |
27 | - | |
28 | -# Do not include host rules unless needed | |
29 | -ifneq ($(hostprogs-y)$(hostprogs-m),) | |
30 | -include $(SRCTREE)/scripts/Makefile.host.tmp | |
31 | -endif | |
32 | - | |
33 | -# Going forward use the following | |
34 | -obj-y := $(sort $(obj-y)) | |
35 | -extra-y := $(sort $(extra-y)) | |
36 | -always := $(sort $(always)) | |
37 | -lib-y := $(sort $(lib-y)) | |
38 | - | |
39 | -subdir-y += $(patsubst %/,%,$(filter %/, $(obj-y))) | |
40 | -obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) | |
41 | -subdir-obj-y := $(filter %/built-in.o, $(obj-y)) | |
42 | -subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) | |
43 | - | |
44 | -SRCS += $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) \ | |
45 | - $(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S) | |
46 | - | |
47 | -SRCS := $(addprefix $(if $(KBUILD_SRC),$(srctree)/$(src)/,$(src)/),$(SRCS)) | |
48 | -SRCS := $(wildcard $(SRCS)) | |
49 | - | |
50 | -OBJS := $(addprefix $(obj)/,$(obj-y)) | |
51 | - | |
52 | -# $(obj-dirs) is a list of directories that contain object files | |
53 | - | |
54 | -obj-dirs += $(dir $(OBJS)) | |
55 | - | |
56 | -_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | |
57 | - | |
58 | -# Create directories for object files if directory does not exist | |
59 | -# Needed when obj-y := dir/file.o syntax is used | |
60 | -_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) | |
61 | - | |
62 | -LGOBJS := $(addprefix $(obj)/,$(sort $(lib-y))) | |
63 | - | |
64 | -all: $(__LIB) $(addprefix $(obj)/,$(extra-y) $(always)) $(subdir-y) | |
65 | - | |
66 | -$(__LIB): $(obj)/.depend $(OBJS) | |
67 | - $(call cmd_link_o_target, $(OBJS)) | |
68 | - | |
69 | -ifneq ($(strip $(lib-y)),) | |
70 | -all: $(LIBGCC) | |
71 | - | |
72 | -$(LIBGCC): $(obj)/.depend $(LGOBJS) | |
73 | - $(call cmd_link_o_target, $(LGOBJS)) | |
74 | -endif | |
75 | - | |
76 | -ifneq ($(subdir-obj-y),) | |
77 | -# Descending | |
78 | -$(subdir-obj-y): $(subdir-y) | |
79 | -endif | |
80 | - | |
81 | -ifneq ($(subdir-y),) | |
82 | -$(subdir-y): FORCE | |
83 | - $(MAKE) $(build)=$(obj)/$@ | |
84 | -endif | |
85 | - | |
86 | -######################################################################### | |
87 | - | |
88 | -# Allow boards to use custom optimize flags on a per dir/file basis | |
89 | -ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) | |
90 | -ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) | |
91 | -EXTRA_CPPFLAGS = $(CPPFLAGS_$(BCURDIR)/$(@F)) $(CPPFLAGS_$(BCURDIR)) | |
92 | -ALL_CFLAGS += $(EXTRA_CPPFLAGS) | |
93 | - | |
94 | -# The _DEP version uses the $< file target (for dependency generation) | |
95 | -# See rules.mk | |
96 | -EXTRA_CPPFLAGS_DEP = $(CPPFLAGS_$(BCURDIR)/$(addsuffix .o,$(basename $<))) \ | |
97 | - $(CPPFLAGS_$(BCURDIR)) | |
98 | -$(obj)/%.s: $(src)/%.S | |
99 | - $(CPP) $(ALL_AFLAGS) -o $@ $< | |
100 | -$(obj)/%.o: $(src)/%.S | |
101 | - $(CC) $(ALL_AFLAGS) -o $@ $< -c | |
102 | -$(obj)/%.o: $(src)/%.c | |
103 | -ifneq ($(CHECKSRC),0) | |
104 | - $(CHECK) $(CHECKFLAGS) $(ALL_CFLAGS) $< | |
105 | -endif | |
106 | - $(CC) $(ALL_CFLAGS) -o $@ $< -c | |
107 | -$(obj)/%.i: $(src)/%.c | |
108 | - $(CPP) $(ALL_CFLAGS) -o $@ $< -c | |
109 | -$(obj)/%.s: $(src)/%.c | |
110 | - $(CC) $(ALL_CFLAGS) -o $@ $< -c -S | |
111 | - | |
112 | -# If the list of objects to link is empty, just create an empty built-in.o | |
113 | -cmd_link_o_target = $(if $(strip $1),\ | |
114 | - $(LD) $(LDFLAGS) -r -o $@ $1,\ | |
115 | - rm -f $@; $(AR) rcs $@ ) | |
116 | - | |
117 | -######################################################################### | |
118 | - | |
119 | -# defines $(obj)/.depend target | |
120 | - | |
121 | -include $(TOPDIR)/rules.mk | |
122 | - | |
123 | -sinclude $(obj)/.depend | |
124 | - | |
125 | -######################################################################### | |
126 | - | |
127 | -.PHONY: FORCE |
scripts/Makefile.host.tmp
1 | - | |
2 | -__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) | |
3 | - | |
4 | -# C code | |
5 | -# Executables compiled from a single .c file | |
6 | -host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) | |
7 | - | |
8 | -# C executables linked based on several .o files | |
9 | -host-cmulti := $(foreach m,$(__hostprogs),$(if $($(m)-objs),$(m))) | |
10 | - | |
11 | -# Object (.o) files compiled from .c files | |
12 | -host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs))) | |
13 | - | |
14 | -# output directory for programs/.o files | |
15 | -# hostprogs-y := tools/build may have been specified. Retrieve directory | |
16 | -host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) | |
17 | -# directory of .o files from prog-objs notation | |
18 | -host-objdirs += $(foreach f,$(host-cmulti), \ | |
19 | - $(foreach m,$($(f)-objs), \ | |
20 | - $(if $(dir $(m)),$(dir $(m))))) | |
21 | - | |
22 | -host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs)))) | |
23 | - | |
24 | -__hostprogs := $(addprefix $(obj)/,$(__hostprogs)) | |
25 | -host-csingle := $(addprefix $(obj)/,$(host-csingle)) | |
26 | -host-cmulti := $(addprefix $(obj)/,$(host-cmulti)) | |
27 | -host-cobjs := $(addprefix $(obj)/,$(host-cobjs)) | |
28 | -host-objdirs := $(addprefix $(obj)/,$(host-objdirs)) | |
29 | - | |
30 | -obj-dirs += $(host-objdirs) | |
31 | - | |
32 | -##### | |
33 | -# Handle options to gcc. Support building with separate output directory | |
34 | - | |
35 | -_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ | |
36 | - $(HOSTCFLAGS_$(basetarget).o) | |
37 | - | |
38 | -# Find all -I options and call addtree | |
39 | -flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) | |
40 | - | |
41 | -ifeq ($(OBJTREE),$(SRCTREE)) | |
42 | -__hostc_flags = $(_hostc_flags) | |
43 | -else | |
44 | -__hostc_flags = -I$(obj) $(call flags,_hostc_flags) | |
45 | -endif | |
46 | - | |
47 | -hostc_flags = $(__hostc_flags) | |
48 | - | |
49 | -##### | |
50 | -# Compile programs on the host | |
51 | - | |
52 | -$(host-csingle): $(obj)/%: $(src)/%.c | |
53 | - $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTLDFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< | |
54 | - | |
55 | -$(host-cmulti): $(obj)/%: $(host-cobjs) | |
56 | - $(HOSTCC) $(HOSTLDFLAGS) -o $@ $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) | |
57 | - | |
58 | -$(host-cobjs): $(obj)/%.o: $(src)/%.c | |
59 | - $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c | |
60 | - | |
61 | -targets += $(host-csingle) $(host-cmulti) $(host-cobjs) |