swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 5e34c8860e613c1d885813380dafb1a1d30ed8a5
parent 2fd90248c8cb8aae28c3857cb792d43d2daa3185
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 20 May 2014 19:28:02 -0700

Use a pattern-specific dir variable so we can use it in the rule definitions

Diffstat:
Mcommon.mk | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common.mk b/common.mk @@ -9,11 +9,13 @@ install-$(dir): .deps/$(dir): @mkdir -p "$@" +$(dir)/%: dir := $(dir) + $(dir)/%.o: $(dir)/%.c | .deps/$(dir) - $(compile) $($(@D)_CFLAGS) $($(@D)_PACKAGE_CFLAGS) + $(compile) $($(dir)_CFLAGS) $($(dir)_PACKAGE_CFLAGS) $(dir)/%.lo: $(dir)/%.c | .deps/$(dir) - $(compile) -fPIC $($(@D)_CFLAGS) $($(@D)_PACKAGE_CFLAGS) + $(compile) -fPIC $($(dir)_CFLAGS) $($(dir)_PACKAGE_CFLAGS) ifdef $(dir)_PACKAGES ifndef $(dir)_PACKAGE_CFLAGS