Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
e143bed1
Commit
e143bed1
authored
17 years ago
by
Felix Fietkau
Browse files
Options
Downloads
Patches
Plain Diff
build system fixes, more cleanup
SVN-Revision: 8207
parent
9c88ba80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+5
-8
5 additions, 8 deletions
Makefile
include/toplevel.mk
+13
-11
13 additions, 11 deletions
include/toplevel.mk
toolchain/Makefile
+16
-49
16 additions, 49 deletions
toolchain/Makefile
tools/Makefile
+10
-10
10 additions, 10 deletions
tools/Makefile
with
44 additions
and
78 deletions
Makefile
+
5
−
8
View file @
e143bed1
# Makefile for OpenWrt
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006 by Felix Fietkau <openwrt@nbd.name>
# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
...
...
@@ -9,22 +8,21 @@
all
:
world
TOPDIR
:=
${
CURDIR
}
LC_ALL
:=
C
LANG
:=
C
IS_TTY
:=
${
shell
tty
-s
&&
echo
1
||
echo
0
}
export
TOPDIR
LC_ALL
LANG
IS_TTY
include
rules.mk
ifneq
($(OPENWRT_BUILD),1)
export
OPENWRT_BUILD
:=
1
include
$(
INCLUDE_DIR)
/toplevel.mk
include
$(
TOPDIR)/include
/toplevel.mk
else
include
rules.mk
include
$(INCLUDE_DIR)/depends.mk
include
$(INCLUDE_DIR)/subdir.mk
include
tools/Makefile
include
toolchain/Makefile
clean
:
FORCE
rm
-rf
build_
*
bin tmp
...
...
@@ -38,8 +36,7 @@ distclean: dirclean config-clean symlinkclean docs/clean
toolchain/% package/% target/%
:
FORCE
$(
MAKE
)
-C
$(
patsubst %/
$*
,%,
$@
)
$*
world
:
.config $(tools/stamp) FORCE
$(
MAKE
)
toolchain/install
world
:
.config $(tools/stamp) $(toolchain/stamp) FORCE
$(
MAKE
)
target/compile
$(
MAKE
)
package/compile
$(
MAKE
)
package/install
...
...
This diff is collapsed.
Click to expand it.
include/toplevel.mk
+
13
−
11
View file @
e143bed1
...
...
@@ -13,6 +13,7 @@ all: world
SHELL
:=
/usr/bin/env bash
OPENWRTVERSION
:=
$(
RELEASE
)
include
$(TOPDIR)/include/verbose.mk
ifneq
($(VERSION),)
OPENWRTVERSION
:=
$(
VERSION
)
(
$(
OPENWRTVERSION
)
)
else
...
...
@@ -33,25 +34,25 @@ export SCAN_COOKIE
tmp/.packageinfo tmp/.targetinfo prepare-tmpinfo
:
@
mkdir
-p
tmp/info
@$(
NO_TRACE_MAKE
)
-s
-f
include/scan.mk
SCAN_TARGET
=
"packageinfo"
SCAN_DIR
=
"package"
SCAN_NAME
=
"package"
SCAN_DEPS
=
"
$(
TOPDIR
)
/include/package*.mk"
SCAN_DEPTH
=
4
SCAN_EXTRA
=
""
@$(
NO_TRACE_MAKE
)
-s
-f
include/scan.mk
SCAN_TARGET
=
"targetinfo"
SCAN_DIR
=
"target/linux"
SCAN_NAME
=
"target"
SCAN_DEPS
=
"profiles/*.mk
$(
TOPDIR
)
/include/kernel*.mk"
SCAN_DEPTH
=
2
SCAN_EXTRA
=
""
@
+
$(
NO_TRACE_MAKE
)
-s
-f
include/scan.mk
SCAN_TARGET
=
"packageinfo"
SCAN_DIR
=
"package"
SCAN_NAME
=
"package"
SCAN_DEPS
=
"
$(
TOPDIR
)
/include/package*.mk"
SCAN_DEPTH
=
4
SCAN_EXTRA
=
""
@
+
$(
NO_TRACE_MAKE
)
-s
-f
include/scan.mk
SCAN_TARGET
=
"targetinfo"
SCAN_DIR
=
"target/linux"
SCAN_NAME
=
"target"
SCAN_DEPS
=
"profiles/*.mk
$(
TOPDIR
)
/include/kernel*.mk"
SCAN_DEPTH
=
2
SCAN_EXTRA
=
""
@
for
type
in
package target
;
do
\
f
=
tmp/.
$${
type
}
info
;
t
=
tmp/.config-
$${
type
}
.in
;
\
[
"
$$
t"
-nt
"
$$
f"
]
||
./scripts/metadata.pl
$${
type
}
_config <
"
$$
f"
>
"
$$
t"
||
{
rm
-f
"
$$
t"
;
echo
"Failed to build
$$
t"
;
false
;
break
;
}
;
\
done
.config
:
./scripts/config/conf prepare-tmpinfo
if
[
\!
-f
.config
]
;
then
\
@
+
if
[
\!
-f
.config
]
;
then
\
[
-e
$(
HOME
)
/.openwrt/defconfig
]
&&
cp
$(
HOME
)
/.openwrt/defconfig .config
;
\
$(
NO_TRACE_MAKE
)
menuconfig
;
\
$(
NO_TRACE_MAKE
)
menuconfig
QUIET
=
0
OPENWRT_BUILD
=
;
\
fi
$<
-D
.config Config.in &> /dev/null
scripts/config/mconf
:
$(
MAKE
)
-C
scripts/config all
@
+
$(
MAKE
)
-C
scripts/config all
scripts/config/conf
:
$(
MAKE
)
-C
scripts/config conf
@
+
$(
MAKE
)
-C
scripts/config conf
config
:
scripts/config/conf prepare-tmpinfo FORCE
$<
Config.in
...
...
@@ -81,24 +82,25 @@ kernel_menuconfig: .config FORCE
tmp/.prereq-build
:
include/prereq-build.mk
mkdir
-p
tmp
rm
-f
tmp/.host.mk
$(
NO_TRACE_MAKE
)
-s
-f
$(
TOPDIR
)
/include/prereq-build.mk prereq 2>/dev/null
||
{
\
@
+
$(
NO_TRACE_MAKE
)
-s
-f
$(
TOPDIR
)
/include/prereq-build.mk prereq 2>/dev/null
||
{
\
echo
"Prerequisite check failed. Use FORCE=1 to override."
;
\
false
;
\
}
touch
$@
tmp/.prereq-package
:
tmp/.packageinfo
tmp/.prereq-package
:
tmp/.packageinfo
.config
tmp/.prereq-target
:
tmp/.targetinfo .config
tmp/.prereq-package tmp/.prereq-target
:
include/prereq.mk
mkdir
-p
tmp
rm
-f
tmp/.host.mk
$(
NO_TRACE_MAKE
)
-s
-C
$(
patsubst tmp/.prereq-%,%,
$@
)
prereq 2>/dev/null
||
{
\
@
+
$(
NO_TRACE_MAKE
)
-s
-C
$(
patsubst tmp/.prereq-%,%,
$@
)
prereq 2>/dev/null
||
{
\
echo
"Prerequisite check failed. Use FORCE=1 to override."
;
\
false
;
\
}
touch
$@
prereq
:
tmp/.prereq-build tmp/.prereq-package tmp/.prereq-target .config FORCE ;
prereq
:
tmp/.prereq-build tmp/.prereq-package tmp/.prereq-target .config FORCE
@
true
download
:
.config FORCE
$(
MAKE
)
-j1
tools/download
...
...
@@ -111,7 +113,7 @@ clean dirclean distclean:
%
::
@$(
SUBMAKE
)
-s
prereq
QUIET
=
0
OPENWRT_BUILD
=
@$(
MAKE
)
$@
@
+
$(
MAKE
)
$@
help
:
cat
README
...
...
This diff is collapsed.
Click to expand it.
toolchain/Makefile
+
16
−
49
View file @
e143bed1
#
# Copyright (C) 200
6
OpenWrt.org
# Copyright (C) 200
7
OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Main makefile for the toolchain
#
include
$(TOPDIR)/rules.mk
TARGETS-y
:=
kernel-headers
TARGETS-$(CONFIG_GDB)
+=
gdb
ifeq
($(CONFIG_NATIVE_TOOLCHAIN),)
TARGETS-y
+=
binutils gcc uClibc
endif
TARGETS_DOWNLOAD
:=
$(
patsubst %,%-download,
$(
TARGETS-y
))
TARGETS_PREPARE
:=
$(
patsubst %,%-prepare,
$(
TARGETS-y
))
TARGETS_COMPILE
:=
$(
patsubst %,%-compile,
$(
TARGETS-y
))
TARGETS_INSTALL
:=
$(
patsubst %,%-install,
$(
TARGETS-y
))
TARGETS_CLEAN
:=
$(
patsubst %,%-clean,
$(
TARGETS-y
))
STAMP
:=
$(
STAGING_DIR
)
/stampfiles/.toolchain_installed
# subdirectories to descend into
toolchain/builddirs
:
= kernel-headers $(if $(CONFIG_GDB)
,
gdb) $(if $(CONFIG_NATIVE_TOOLCHAIN)
,,
binutils gcc uClibc)
all
:
install
download
:
$(TARGETS_DOWNLOAD)
compile
:
$(TARGETS_COMPILE)
install
:
$(STAMP)
clean
:
$(TARGETS_CLEAN)
ifneq
($(shell $(SCRIPT_DIR)/timestamp.pl -p . $(STAMP)),$(STAMP))
$(STAMP)
:
$(TARGETS_INSTALL)
endif
uClibc-prepare
:
kernel-headers-prepare
# builddir dependencies
toolchain/uClibc/prepare
:
=toolchain/kernel-headers/prepare
ifeq
($(CONFIG_NATIVE_TOOLCHAIN),)
binutils
-
prepare
:
uClibc
-
prepare
gcc
-
prepare
:
binutils
-
install
uClibc
-
compile
:
gcc
-
compile
toolchain/
binutils
/
prepare
:
=toolchain/
uClibc
/
prepare
toolchain/
gcc
/
prepare
:
=toolchain/
binutils
/
install
toolchain/
uClibc
/
compile
:
=toolchain/
gcc
/
compile
endif
gcc-install
:
uClibc-install
$(STAMP)
:
mkdir
-p
$(
shell
dirname
$@
)
touch
$@
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
:
@
mkdir
-p
$@
@
ln
-sf
../lib
$@
/lib
$(TOOLCHAIN_BUILD_DIR)
:
@
mkdir
-p
$@
toolchain/gcc/install
:
=toolchain/uClibc/install
%-prereq %-download %-clean %-refresh %-update
:
FORCE
$(
MAKE
)
-C
$*
$(
patsubst
$*
-%,%,
$@
)
# prerequisites for the individual targets
toolchain/
:
= .config $(tools/stamp)
toolchain//
prepare
=
$(
STAGING_DIR
)
/include-host/.done
toolchain//
compile
=
$(
1
)
/prepare
toolchain//
install
=
$(
1
)
/compile
%-prepare
:
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) $(TOOLCHAIN_BUILD_DIR)
$(
MAKE
)
-C
$*
$(
patsubst
$*
-%,%,
$@
)
$(
eval
$(
call stampfile,toolchain,toolchain
))
$(
eval
$(
call subdir,toolchain
)
)
%-compile
:
%-prepare FORCE
$(
MAKE
)
-C
$*
$(
patsubst
$*
-%,%,
$@
)
%-install
:
%-compile FORCE
$(
MAKE
)
-C
$*
$(
patsubst
$*
-%,%,
$@
)
This diff is collapsed.
Click to expand it.
tools/Makefile
+
10
−
10
View file @
e143bed1
...
...
@@ -7,25 +7,25 @@
# Main makefile for the host tools
#
curdir
:=
$(
patsubst %/Makefile,%,
$(
lastword
$(
MAKEFILE_LIST
)))
curdir
:=
tools
# subdirectories to descend into
$(curdir)
/builddirs
:
= sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE)
,
ccache)
tools
/builddirs
:
= sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE)
,
ccache)
# builddir dependencies
$(curdir)
/squashfs/compile
:
=
$(curdir)
/lzma/install
tools
/squashfs/compile
:
=
tools
/lzma/install
# preparatory work
$(STAGING_DIR)/include-host/.done
:
@
mkdir
-p
$$(
dirname
$@
)
@
cp
$(
curdir
)
/include/
*
.h
$$(
dirname
$@
)
/
@
cp
tools
/include/
*
.h
$$(
dirname
$@
)
/
@
touch
$@
# prerequisites for the individual targets
$(curdir)
/
:
= .config
$(curdir)
//
prepare
=
$(
STAGING_DIR
)
/include-host/.done
$(curdir)
//
compile
=
$(
1
)
/prepare
$(curdir)
//
install
=
$(
1
)
/compile
tools
/
:
= .config
tools
//
prepare
=
$(
STAGING_DIR
)
/include-host/.done
tools
//
compile
=
$(
1
)
/prepare
tools
//
install
=
$(
1
)
/compile
$(
eval
$(
call stampfile,
$(
curdir
)
,tools
))
$(
eval
$(
call subdir,
$(
curdir
)
))
$(
eval
$(
call stampfile,
tools
,tools
))
$(
eval
$(
call subdir,
tools
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment