Commit 4b4b98c2 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Use $(core-y) and friends directly

The capitalized aliases $(CORE_FILES) etc are basically superfluous now,
move the remaining users to $(core-y) and the like.
parent d732f127
...@@ -151,7 +151,7 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ ...@@ -151,7 +151,7 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL
export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS OBJCOPYFLAGS export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
...@@ -249,29 +249,25 @@ endif ...@@ -249,29 +249,25 @@ endif
init-y := init/ init-y := init/
drivers-y := drivers/ sound/ drivers-y := drivers/ sound/
networks-y := net/ net-y := net/
libs-y := lib/ libs-y := lib/
core-y :=
SUBDIRS :=
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
core-y += kernel/ mm/ fs/ ipc/ security/ core-y += kernel/ mm/ fs/ ipc/ security/
SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m))) SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
INIT += $(patsubst %/, %/built-in.o, $(init-y)) $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
$(net-y) $(net-m) $(libs-y) $(libs-m)))
init-y := $(patsubst %/, %/built-in.o, $(init-y))
core-y := $(patsubst %/, %/built-in.o, $(core-y))
drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y))
net-y := $(patsubst %/, %/built-in.o, $(net-y))
libs-y := $(patsubst %/, %/lib.a, $(libs-y))
SUBDIRS += $(patsubst %/,%,$(filter %/, $(core-y) $(core-m))) $(warning $(SUBDIRS))
CORE_FILES += $(patsubst %/, %/built-in.o, $(core-y))
SUBDIRS += $(patsubst %/,%,$(filter %/, $(drivers-y) $(drivers-m)))
DRIVERS += $(patsubst %/, %/built-in.o, $(drivers-y))
SUBDIRS += $(patsubst %/,%,$(filter %/, $(networks-y) $(networks-m)))
NETWORKS += $(patsubst %/, %/built-in.o, $(networks-y))
SUBDIRS += $(patsubst %/,%,$(filter %/, $(libs-y) $(libs-m)))
LIBS += $(patsubst %/, %/lib.a, $(libs-y))
export NETWORKS DRIVERS LIBS HEAD LDFLAGS MAKEBOOT
# Build vmlinux # Build vmlinux
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -283,16 +279,16 @@ export NETWORKS DRIVERS LIBS HEAD LDFLAGS MAKEBOOT ...@@ -283,16 +279,16 @@ export NETWORKS DRIVERS LIBS HEAD LDFLAGS MAKEBOOT
# we cannot yet know if we will need to relink vmlinux. # we cannot yet know if we will need to relink vmlinux.
# So we descend into init/ inside the rule for vmlinux again. # So we descend into init/ inside the rule for vmlinux again.
vmlinux-objs := $(HEAD) $(INIT) $(CORE_FILES) $(LIBS) $(DRIVERS) $(NETWORKS) vmlinux-objs := $(HEAD) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)
quiet_cmd_link_vmlinux = LD $@ quiet_cmd_link_vmlinux = LD $@
define cmd_link_vmlinux define cmd_link_vmlinux
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(HEAD) $(INIT) \ $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(HEAD) $(init-y) \
--start-group \ --start-group \
$(CORE_FILES) \ $(core-y) \
$(LIBS) \ $(libs-y) \
$(DRIVERS) \ $(drivers-y) \
$(NETWORKS) \ $(net-y) \
--end-group \ --end-group \
$(filter $(kallsyms.o),$^) \ $(filter $(kallsyms.o),$^) \
-o $@ -o $@
......
...@@ -95,6 +95,8 @@ core-y += arch/alpha/kernel/ arch/alpha/mm/ ...@@ -95,6 +95,8 @@ core-y += arch/alpha/kernel/ arch/alpha/mm/
core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/ core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/
libs-y += arch/alpha/lib/ libs-y += arch/alpha/lib/
export libs-y
MAKEBOOT = $(MAKE) -C arch/alpha/boot MAKEBOOT = $(MAKE) -C arch/alpha/boot
rawboot: rawboot:
......
...@@ -20,7 +20,7 @@ BPOBJECTS = head.o bootp.o ...@@ -20,7 +20,7 @@ BPOBJECTS = head.o bootp.o
TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo
VMLINUX = $(TOPDIR)/vmlinux VMLINUX = $(TOPDIR)/vmlinux
OBJSTRIP = tools/objstrip OBJSTRIP = tools/objstrip
LIBS := $(patsubst lib/%,$(TOPDIR)/lib/%,$(LIBS)) LIBS := $(addprefix $(TOPDIR)/,$(libs-y))
all: $(TARGETS) all: $(TARGETS)
@echo Ready to install kernel in $(shell pwd)/vmlinux.gz @echo Ready to install kernel in $(shell pwd)/vmlinux.gz
......
...@@ -41,8 +41,7 @@ core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/ ...@@ -41,8 +41,7 @@ core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/
libs-y += arch/sparc/prom/ arch/sparc/lib/ libs-y += arch/sparc/prom/ arch/sparc/lib/
# Export what is needed by arch/sparc/boot/Makefile # Export what is needed by arch/sparc/boot/Makefile
export CORE_FILES export init-y core-y drivers-y net-y libs-y HEAD
export INIT
image: vmlinux image: vmlinux
$(MAKE) -C arch/sparc/boot image $(MAKE) -C arch/sparc/boot image
......
...@@ -22,9 +22,8 @@ btfixupprep: btfixupprep.c ...@@ -22,9 +22,8 @@ btfixupprep: btfixupprep.c
clean: clean:
rm -f btfixupprep piggyback tftpboot.img btfix.o btfix.s image rm -f btfixupprep piggyback tftpboot.img btfix.o btfix.s image
BTOBJS := $(HEAD) $(INIT) BTOBJS := $(HEAD) $(init-y)
BTLIBS := $(CORE_FILES) $(LIBS) \ BTLIBS := $(core-y) $(LIBS) $(drivers-y) $(net-y)
$(DRIVERS) $(NETWORKS)
# Actual linking # Actual linking
image: btfix.o image: btfix.o
......
...@@ -27,7 +27,7 @@ int isdn_ppp_xmit(struct sk_buff *, struct net_device *); ...@@ -27,7 +27,7 @@ int isdn_ppp_xmit(struct sk_buff *, struct net_device *);
#else #else
static inline int static inline int
isdn_ppp_xmit(struct sk_buff *, struct net_device *); isdn_ppp_xmit(struct sk_buff *, struct net_device *)
{ {
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment