Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
40735491
Commit
40735491
authored
Dec 01, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-sam.bkbits.net/kbuild
into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
parents
8d81094b
38a481f5
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
70 deletions
+42
-70
Makefile
Makefile
+6
-6
arch/i386/Makefile
arch/i386/Makefile
+6
-6
arch/i386/boot/Makefile
arch/i386/boot/Makefile
+3
-9
arch/i386/boot/compressed/Makefile
arch/i386/boot/compressed/Makefile
+1
-0
drivers/misc/Makefile
drivers/misc/Makefile
+1
-1
scripts/Makefile
scripts/Makefile
+4
-23
scripts/Makefile.build
scripts/Makefile.build
+10
-17
scripts/Makefile.lib
scripts/Makefile.lib
+9
-2
scripts/lxdialog/Makefile
scripts/lxdialog/Makefile
+2
-6
No files found.
Makefile
View file @
40735491
...
...
@@ -203,7 +203,7 @@ scripts/docproc scripts/fixdep scripts/split-include : scripts ;
.PHONY
:
scripts
scripts
:
+@
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
scripts
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
scripts
# Objects we will link into vmlinux / subdirs we need to visit
# ---------------------------------------------------------------------------
...
...
@@ -435,7 +435,7 @@ include/config/MARKER: scripts/split-include include/linux/autoconf.h
# with it and forgot to run make oldconfig
include/linux/autoconf.h
:
.config
+@
$(
call
descend,scripts/kconfig,scripts/kconfig/conf
)
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
scripts/kconfig scripts/kconfig/conf
./scripts/kconfig/conf
-s
arch
/
$(ARCH)
/Kconfig
# Generate some files
...
...
@@ -639,13 +639,13 @@ ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
make_with_config
scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf
:
scripts/fixdep FORCE
+@
$(
call
descend,scripts/kconfig,
$@
)
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
scripts/kconfig
$@
xconfig
:
scripts/kconfig/qconf
./scripts/kconfig/qconf
arch
/
$(ARCH)
/Kconfig
menuconfig
:
scripts/kconfig/mconf
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
scripts
lxdialog
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
scripts
/
lxdialog
./scripts/kconfig/mconf
arch
/
$(ARCH)
/Kconfig
config
:
scripts/kconfig/conf
...
...
@@ -827,7 +827,7 @@ else # ifneq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
# ===========================================================================
%
::
FORCE
$(MAKE)
$@
$(
Q)$(
MAKE)
$@
endif
# ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
endif
# ifdef include_config
...
...
@@ -888,6 +888,6 @@ endef
# $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target>
descend
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
$(1)
$(2)
descend
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
$(1)
$(2)
FORCE
:
arch/i386/Makefile
View file @
40735491
...
...
@@ -66,7 +66,7 @@ drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/
CFLAGS
+=
-Iarch
/i386/
$(MACHINE)
AFLAGS
+=
-Iarch
/i386/
$(MACHINE)
makeboot
=
$(
call
descend,arch/i386/boot,
$(1)
)
makeboot
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
arch
/i386/boot
$(1
)
.PHONY
:
zImage bzImage compressed zlilo bzlilo zdisk bzdisk install
\
clean archclean archmrproper
...
...
@@ -77,20 +77,20 @@ BOOTIMAGE=arch/i386/boot/bzImage
zImage zlilo zdisk
:
BOOTIMAGE=arch/i386/boot/zImage
zImage bzImage
:
vmlinux
+@
$(
call
makeboot,
$(BOOTIMAGE)
)
$(
call
makeboot,
$(BOOTIMAGE)
)
compressed
:
zImage
zlilo bzlilo
:
vmlinux
+@
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
zlilo
)
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
zlilo
)
zdisk bzdisk
:
vmlinux
+@
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
zdisk
)
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
zdisk
)
install
:
vmlinux
+@
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
install
)
$(
call
makeboot,BOOTIMAGE
=
$(BOOTIMAGE)
install
)
archclean
:
@
$(MAKE)
-f
scripts/Makefile.clean
obj
=
arch
/i386/boot
$(Q)
$(MAKE)
-f
scripts/Makefile.clean
obj
=
arch
/i386/boot
archmrproper
:
arch/i386/boot/Makefile
View file @
40735491
...
...
@@ -32,12 +32,6 @@ subdir- := compressed
host-progs
:=
tools/build
# Default
boot
:
bzImage
include
$(TOPDIR)/Rules.make
# ---------------------------------------------------------------------------
$(obj)/zImage
:
IMAGE_OFFSET := 0x1000
...
...
@@ -53,6 +47,7 @@ cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
$(obj)/zImage $(obj)/bzImage
:
$(obj)/bootsect $(obj)/setup
\
$(obj)/vmlinux.bin $(obj)/tools/build FORCE
$(
call
if_changed,image
)
@
echo
'Kernel: $@ is ready'
$(obj)/vmlinux.bin
:
$(obj)/compressed/vmlinux FORCE
$(
call
if_changed,objcopy
)
...
...
@@ -64,9 +59,8 @@ $(obj)/setup $(obj)/bootsect: %: %.o FORCE
$(
call
if_changed,ld
)
$(obj)/compressed/vmlinux
:
FORCE
+@
$(
call
descend,
$(obj)
/compressed,IMAGE_OFFSET
=
$(IMAGE_OFFSET)
\
$(obj)
/compressed/vmlinux
)
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
$(obj)
/compressed
\
IMAGE_OFFSET
=
$(IMAGE_OFFSET)
$@
zdisk
:
$(BOOTIMAGE)
dd
bs
=
8192
if
=
$(BOOTIMAGE)
of
=
/dev/fd0
...
...
arch/i386/boot/compressed/Makefile
View file @
40735491
...
...
@@ -13,6 +13,7 @@ LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
$(obj)/vmlinux
:
$(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
$(
call
if_changed,ld
)
@
:
$(obj)/vmlinux.bin
:
vmlinux FORCE
$(
call
if_changed,objcopy
)
...
...
drivers/misc/Makefile
View file @
40735491
#
# Makefile for misc devices that really don't fit anywhere else.
#
obj-
:=
misc.o
# Dummy rule to force built-in.o to be made
include
$(TOPDIR)/Rules.make
scripts/Makefile
View file @
40735491
...
...
@@ -8,31 +8,12 @@
# docproc: Preprocess .tmpl file in order to generate .sgml documentation
# conmakehash: Create arrays for initializing the kernel console tables
EXTRA_TARGETS
:=
fixdep split-include docproc conmakehash
subdir-
:=
lxdialog kconfig
# Yikes. We need to build this stuff here even if the user only wants
# modules.
KBUILD_BUILTIN
:=
1
# The following temporary rule will make sure that people's
# trees get updated to the right permissions, since patch(1)
# can't do it
# ---------------------------------------------------------------------------
host-progs
:=
fixdep split-include conmakehash docproc
build-targets
:=
$
(
host-progs
)
include
$(TOPDIR)/Rules.make
# ---------------------------------------------------------------------------
# Targets hardcoded and wellknow in top-level makefile
.PHONY
:
lxdialog
lxdialog
:
$(
call
descend,scripts/lxdialog,
)
# Let clean descend into subdirs
subdir-
:=
lxdialog kconfig
# fixdep is needed to compile other host programs
$(obj)/split
-include
$(obj)/docproc \
$(obj)/conmakehash
lxdialog
:
$(obj)/fixdep
$(obj)/conmakehash
:
$(obj)/fixdep
scripts/Makefile.build
View file @
40735491
...
...
@@ -40,12 +40,14 @@ endif
ifdef
L_TARGET
L_TARGET
:=
$(obj)
/
$(L_TARGET)
else
ifneq
($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-)),)
O_TARGET
:=
$(obj)
/built-in.o
endif
endif
__build
:
$(if $(KBUILD_BUILTIN)
,
$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS))
\
$(if $(KBUILD_MODULES)
,
$(obj-m))
\
$(subdir-ym)
$(subdir-ym)
$(build-targets)
@
:
# Compile C sources (.c)
...
...
@@ -103,7 +105,9 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
$(
call
if_changed_dep,cc_o_c
)
quiet_cmd_cc_lst_c
=
MKLST
$@
cmd_cc_lst_c
=
$(CC)
$(c_flags)
-g
-c
-o
$*
.o
$<
&&
sh scripts/makelst
$*
.o System.map
$(OBJDUMP)
>
$@
cmd_cc_lst_c
=
$(CC)
$(c_flags)
-g
-c
-o
$*
.o
$<
&&
\
$(CONFIG_SHELL)
$(src)
/scripts/makelst
$*
.o
\
System.map
$(OBJDUMP)
>
$@
%.lst
:
%.c FORCE
$(
call
if_changed_dep,cc_lst_c
)
...
...
@@ -116,9 +120,6 @@ modkern_aflags := $(AFLAGS_KERNEL)
$(real-objs-m)
:
modkern_aflags := $(AFLAGS_MODULE)
$(real-objs-m
:
.o=.s): modkern_aflags := $(AFLAGS_MODULE)
a_flags
=
-Wp
,-MD,
$(depfile)
$(AFLAGS)
$(NOSTDINC_FLAGS)
\
$(modkern_aflags)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$
(
*
F
)
.o
)
quiet_cmd_as_s_S
=
CPP
$(quiet_modtag)
$@
cmd_as_s_S
=
$(CPP)
$(a_flags)
-o
$@
$<
...
...
@@ -217,9 +218,7 @@ targets += $(multi-used-y) $(multi-used-m)
# Create executable from a single .c file
# host-csingle -> Executable
quiet_cmd_host-csingle
=
HOSTCC
$@
cmd_host-csingle
=
$(HOSTCC)
-Wp
,-MD,
$(depfile)
\
$(HOSTCFLAGS)
$(HOST_EXTRACFLAGS)
\
$(HOST_LOADLIBES)
-o
$@
$<
cmd_host-csingle
=
$(HOSTCC)
$(hostc_flags)
$(HOST_LOADLIBES)
-o
$@
$<
$(host-csingle)
:
%: %.c FORCE
$(
call
if_changed_dep,host-csingle
)
...
...
@@ -235,9 +234,7 @@ $(host-cmulti): %: $(host-cobjs) $(host-cshlib) FORCE
# Create .o file from a single .c file
# host-cobjs -> .o
quiet_cmd_host-cobjs
=
HOSTCC
$@
cmd_host-cobjs
=
$(HOSTCC)
-Wp
,-MD,
$(depfile)
\
$(HOSTCFLAGS)
$(HOST_EXTRACFLAGS)
\
$
(
HOSTCFLAGS_
$
(
@F
))
-c
-o
$@
$<
cmd_host-cobjs
=
$(HOSTCC)
$(hostc_flags)
-c
-o
$@
$<
$(host-cobjs)
:
%.o: %.c FORCE
$(
call
if_changed_dep,host-cobjs
)
...
...
@@ -253,18 +250,14 @@ $(host-cxxmulti): %: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE
# Create .o file from a single .cc (C++) file
quiet_cmd_host-cxxobjs
=
HOSTCXX
$@
cmd_host-cxxobjs
=
$(HOSTCXX)
-Wp
,-MD,
$(depfile)
\
$(HOSTCXXFLAGS)
$(HOST_EXTRACXXFLAGS)
\
$
(
HOSTCXXFLAGS_
$
(
@F
))
-c
-o
$@
$<
cmd_host-cxxobjs
=
$(HOSTCXX)
$(hostcxx_flags)
-c
-o
$@
$<
$(host-cxxobjs)
:
%.o: %.cc FORCE
$(
call
if_changed_dep,host-cxxobjs
)
# Compile .c file, create position independent .o file
# host-cshobjs -> .o
quiet_cmd_host-cshobjs
=
HOSTCC
-fPIC
$@
cmd_host-cshobjs
=
$(HOSTCC)
-Wp
,-MD,
$(depfile)
-fPIC
\
$(HOSTCFLAGS)
$(HOST_EXTRACFLAGS)
\
$
(
HOSTCFLAGS_
$
(
@F
))
-c
-o
$@
$<
cmd_host-cshobjs
=
$(HOSTCC)
$(hostc_flags)
-fPIC
-c
-o
$@
$<
$(host-cshobjs)
:
%.o: %.c FORCE
$(
call
if_changed_dep,host-cshobjs
)
...
...
scripts/Makefile.lib
View file @
40735491
...
...
@@ -92,6 +92,7 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs))))
# Add subdir path
EXTRA_TARGETS
:=
$(
addprefix
$(obj)
/,
$(EXTRA_TARGETS)
)
build-targets
:=
$(
addprefix
$(obj)
/,
$
(
build-targets
))
obj-y
:=
$(
addprefix
$(obj)
/,
$
(
obj-y
))
obj-m
:=
$(
addprefix
$(obj)
/,
$
(
obj-m
))
export-objs
:=
$(
addprefix
$(obj)
/,
$
(
export-objs
))
...
...
@@ -128,6 +129,12 @@ modname_flags = $(if $(filter 1,$(words $(modname))),-DKBUILD_MODNAME=$(subst $
c_flags
=
-Wp
,-MD,
$(depfile)
$(CFLAGS)
$(NOSTDINC_FLAGS)
\
$(modkern_cflags)
$(EXTRA_CFLAGS)
$
(
CFLAGS_
$
(
*
F
)
.o
)
\
$(basename_flags)
$(modname_flags)
$(export_flags)
a_flags
=
-Wp
,-MD,
$(depfile)
$(AFLAGS)
$(NOSTDINC_FLAGS)
\
$(modkern_aflags)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$
(
*
F
)
.o
)
hostc_flags
=
-Wp
,-MD,
$(depfile)
$(HOSTCFLAGS)
$(HOST_EXTRACFLAGS)
\
$
(
HOSTCFLAGS_
$
(
*
F
)
.o
)
hostcxx_flags
=
-Wp
,-MD,
$(depfile)
$(HOSTCXXFLAGS)
$(HOST_EXTRACXXFLAGS)
\
$
(
HOSTCXXFLAGS_
$
(
*
F
)
.o
)
# Finds the multi-part object the current object will be linked into
modname-multi
=
$(
sort
$(
foreach
m,
$
(
multi-used
)
,
\
...
...
@@ -139,7 +146,7 @@ modname-multi = $(sort $(foreach m,$(multi-used),\
quiet_cmd_shipped
=
SHIPPED
$@
cmd_shipped
=
cat
$<
>
$@
%
::
%_shipped
$(obj)/%
::
$(src)/
%_shipped
$(
call
cmd,shipped
)
# Commands useful for building a boot image
...
...
@@ -236,4 +243,4 @@ endef
# $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target>
descend
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
$(1)
$(2)
descend
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
$(1)
$(2)
scripts/lxdialog/Makefile
View file @
40735491
...
...
@@ -16,18 +16,14 @@ endif
endif
host-progs
:=
lxdialog
build-targets
:=
$
(
host-progs
)
lxdialog-objs
:=
checklist.o menubox.o textbox.o yesno.o inputbox.o
\
util.o lxdialog.o msgbox.o
EXTRA_TARGETS
:=
lxdialog
first_rule
:
ncurses
include
$(TOPDIR)/Rules.make
.PHONY
:
ncurses
ncurses
:
@
echo
"main() {}"
>
lxtemp.c
@
if
$(HOSTCC)
lxtemp.c
$(HOST_LOADLIBES)
;
then
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment