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
nexedi
linux
Commits
01474cc4
Commit
01474cc4
authored
May 12, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rules.make cleanup: introduce c_flags, a_flags
parent
dc79d6c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
Rules.make
Rules.make
+14
-9
No files found.
Rules.make
View file @
01474cc4
...
@@ -54,37 +54,42 @@ ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
...
@@ -54,37 +54,42 @@ ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
# Common rules
# Common rules
#
#
c_flags
=
$(CFLAGS)
$(EXTRA_CFLAGS)
$
(
CFLAGS_
$@
)
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
%.s
:
%.c
%.s
:
%.c
$(CC)
$(
CFLAGS)
$(EXTRA_CFLAGS)
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
$
(
CFLAGS_
$@
)
-S
$<
-o
$@
$(CC)
$(
c_flags
)
-S
$<
-o
$@
%.i
:
%.c
%.i
:
%.c
$(CPP)
$(
CFLAGS)
$(EXTRA_CFLAGS)
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
$
(
CFLAGS_
$@
)
$<
>
$@
$(CPP)
$(
c_flags
)
$<
>
$@
%.o
:
%.c
%.o
:
%.c
$(CC)
$(
CFLAGS)
$(EXTRA_CFLAGS)
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
$
(
CFLAGS_
$@
)
-c
-o
$@
$<
$(CC)
$(
c_flags
)
-c
-o
$@
$<
@
(
\
@
(
\
echo
'ifeq (
$(
strip
$(
subst
$(comma)
,:,
$(CFLAGS)
$(EXTRA_CFLAGS)
$(CFLAGS_$@
)))
,$
$(
strip
$
$(
subst
$
$(comma)
,:,$
$(CFLAGS)
$
$(EXTRA_CFLAGS)
$$(CFLAGS_$@
)))
)'
;
\
echo
'ifeq (
$(
strip
$(
subst
$(comma)
,:,
$(CFLAGS)
$(EXTRA_CFLAGS)
$(CFLAGS_$@
)))
,$
$(
strip
$
$(
subst
$
$(comma)
,:,$
$(CFLAGS)
$
$(EXTRA_CFLAGS)
$$(CFLAGS_$@
)))
)'
;
\
echo
'FILES_FLAGS_UP_TO_DATE += $@'
;
\
echo
'FILES_FLAGS_UP_TO_DATE += $@'
;
\
echo
'endif'
\
echo
'endif'
\
)
>
$(
dir
$@
)
/.
$(
notdir
$@
)
.flags
)
>
$(
dir
$@
)
/.
$(
notdir
$@
)
.flags
%.o
:
%.s
$(AS)
$(AFLAGS)
$(EXTRA_CFLAGS)
-o
$@
$<
# Old makefiles define their own rules for compiling .S files,
# Old makefiles define their own rules for compiling .S files,
# but these standard rules are available for any Makefile that
# but these standard rules are available for any Makefile that
# wants to use them. Our plan is to incrementally convert all
# wants to use them. Our plan is to incrementally convert all
# the Makefiles to these standard rules. -- rmk, mec
# the Makefiles to these standard rules. -- rmk, mec
ifdef
USE_STANDARD_AS_RULE
ifdef
USE_STANDARD_AS_RULE
a_flags
=
$(AFLAGS)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$@
)
%.s
:
%.S
%.s
:
%.S
$(CPP)
$(
AFLAGS)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$@
)
$<
>
$@
$(CPP)
$(
a_flags
)
$<
>
$@
%.o
:
%.S
%.o
:
%.S
$(CC)
$(
AFLAGS)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$@
)
-c
-o
$@
$<
$(CC)
$(
a_flags
)
-c
-o
$@
$<
endif
endif
# FIXME is anybody using this rule? Why does it have EXTRA_CFLAGS?
%.o
:
%.s
$(AS)
$(AFLAGS)
$(EXTRA_CFLAGS)
-o
$@
$<
%.lst
:
%.c
%.lst
:
%.c
$(CC)
$(CFLAGS)
$(EXTRA_CFLAGS)
$
(
CFLAGS_
$@
)
-g
-c
-o
$*
.o
$<
$(CC)
$(CFLAGS)
$(EXTRA_CFLAGS)
$
(
CFLAGS_
$@
)
-g
-c
-o
$*
.o
$<
$(TOPDIR)
/scripts/makelst
$*
$(TOPDIR)
$(OBJDUMP)
$(TOPDIR)
/scripts/makelst
$*
$(TOPDIR)
$(OBJDUMP)
...
@@ -322,7 +327,7 @@ endif # CONFIG_MODVERSIONS
...
@@ -322,7 +327,7 @@ endif # CONFIG_MODVERSIONS
ifneq
"$(strip $(export-objs))" ""
ifneq
"$(strip $(export-objs))" ""
$(export-objs)
:
$(TOPDIR)/include/linux/modversions.h
$(export-objs)
:
$(TOPDIR)/include/linux/modversions.h
$(export-objs)
:
%.o: %.c
$(export-objs)
:
%.o: %.c
$(CC)
$(
CFLAGS)
$(EXTRA_CFLAGS)
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
$
(
CFLAGS_
$@
)
-DEXPORT_SYMTAB
-c
$
(
@:.o
=
.c
)
$(CC)
$(
c_flags)
-DEXPORT_SYMTAB
-c
-o
$@
$<
@
(
\
@
(
\
echo
'ifeq (
$(
strip
$(
subst
$(comma)
,:,
$(CFLAGS)
$(EXTRA_CFLAGS)
$(CFLAGS_$@
)
-DEXPORT_SYMTAB
))
,$
$(
strip
$
$(
subst
$
$(comma)
,:,$
$(CFLAGS)
$
$(EXTRA_CFLAGS)
$$(CFLAGS_$@
)
-DEXPORT_SYMTAB
))
)'
;
\
echo
'ifeq (
$(
strip
$(
subst
$(comma)
,:,
$(CFLAGS)
$(EXTRA_CFLAGS)
$(CFLAGS_$@
)
-DEXPORT_SYMTAB
))
,$
$(
strip
$
$(
subst
$
$(comma)
,:,$
$(CFLAGS)
$
$(EXTRA_CFLAGS)
$$(CFLAGS_$@
)
-DEXPORT_SYMTAB
))
)'
;
\
echo
'FILES_FLAGS_UP_TO_DATE += $@'
;
\
echo
'FILES_FLAGS_UP_TO_DATE += $@'
;
\
...
...
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