Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
2e3032ec
Commit
2e3032ec
authored
Dec 11, 2015
by
Marek Vavruša
Browse files
build: better incremental builds (less depends)
parent
e5cfc82d
Changes
1
Hide whitespace changes
Inline
Side-by-side
platform.mk
View file @
2e3032ec
...
...
@@ -67,6 +67,10 @@ $(1)_OBJ := $$($(1)_SOURCES:.c=.o)
$(1)_DEP
:=
$$
(
$(1)
_SOURCES:.c
=
.d
)
-include
$$($(1)_DEP)
endef
define
make_objrule
$(1)
:
$(1:.o=.c)
$
$(
call
quiet,CC,
$$
<
)
$(2)
-MMD
-MP
-c
$$
<
-o
$$
@
endef
# Make target (name,path,ext,ldflags,dst,amalgable)
define
make_target
...
...
@@ -82,8 +86,7 @@ else
$$(eval
$$(call
make_objs,$(1)))
endif
# Rules to generate objects with custom CFLAGS and binary/library
$$($(1)_OBJ)
:
$$($(1)_SOURCES)
$(
call
quiet,CC,
$$
(
@:%.o
=
%.c
))
$(BUILD_CFLAGS)
$$
(
$(1)
_CFLAGS
)
-MMD
-MP
-c
$$
(
@:%.o
=
%.c
)
-o
$$
@
$$(foreach
obj,$$($(1)_OBJ),$$(eval
$$(call
make_objrule,$$(obj),$(BUILD_CFLAGS)
$$($(1)_CFLAGS))))
$(1)
:=
$(2)
/
$(1)$(3)
$(2)/$(1)$(3)
:
$$($(1)_OBJ) $$($(1)_DEPEND)
ifeq
($(4),-$(ARTYPE))
...
...
Write
Preview
Supports
Markdown
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