diff options
author | Lauri Leukkunen <lle@rahina.org> | 2006-08-24 10:43:29 +0300 |
---|---|---|
committer | Lauri Leukkunen <lleukkun@leka.rahina.org> | 2006-08-24 10:43:29 +0300 |
commit | 524fba6cf5a32192cc3362b74a8bacc80e3adfd0 (patch) | |
tree | 1a6bc975036373911443e9013dcc51571747ddb5 | |
parent | 9bdb5fb432bb53c8c54c3ba8545039bd2f3f953e (diff) |
* fix up built-in.o handling
-rw-r--r-- | Makefile.include | 23 | ||||
-rw-r--r-- | preload/Makefile | 2 |
2 files changed, 19 insertions, 6 deletions
diff --git a/Makefile.include b/Makefile.include index 8c2581a..bc4160d 100644 --- a/Makefile.include +++ b/Makefile.include @@ -25,6 +25,8 @@ ifndef _LL_BUILD_MAKEFILE_INCLUDE _LL_BUILD_MAKEFILE_INCLUDE=1 +-include $(TOPDIR)/.config + built_in_target := built-in.o builtin_files := $(patsubst %,%/built-in.o,$(subdirs)) @@ -47,23 +49,34 @@ ll_mainlevel: ll_subdir: $(subdir_deps) @$(MAKE) --no-print-directory -f $(TOPDIR)/Makefile.build $(built_in_target) $(extra_targets) -$(built_in_target): $(obj-default) +ifeq ("$(strip $(builtin_files) $(obj-default))", "") +$(built_in_target): + @true +else +$(built_in_target): $(builtin_files) $(obj-default) $(ll_pretty_link_builtin) +endif OPT_CURDIR = $(patsubst /%,%,$(strip $(subst $(TOPDIR), , $(CURDIR)))) - +ifndef ll_verbose define ll_pretty_run run_output=$$($$run_cmd 2>&1); \ if [ $$? -ne 0 ]; then \ echo $$run_cmd; echo $(OPT_CURDIR)/$$run_output; \ false; \ else \ - echo [$$run_alias] [$@] $(OPT_CURDIR)/$^; \ + echo [$$run_alias] [$(OPT_CURDIR)/$@] $^; \ echo "$$run_output" | grep " warning: "; \ true ; \ fi endef +else +define ll_pretty_run + echo $$run_cmd; \ + $$run_cmd; +endef +endif define ll_pretty_build_c @run_cmd="$(CC) $(CFLAGS) -Wp,-MD,$(dir $(@))/.$(notdir $(@)).d -o $@ -c $<"; \ @@ -79,13 +92,13 @@ endef define ll_pretty_link_shared_library @run_cmd="$(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS)"; \ - run_alias="LD SHARED LIB"; \ + run_alias="SHLIB"; \ $(ll_pretty_run) endef define ll_pretty_link_shared_binary @run_cmd="$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)"; \ - run_alias="LD SHARED BIN";\ + run_alias="BIN";\ $(ll_pretty_run) endef diff --git a/preload/Makefile b/preload/Makefile index 578ca20..1489b2a 100644 --- a/preload/Makefile +++ b/preload/Makefile @@ -7,6 +7,6 @@ obj-default = libsb2.o libsb_env.o sb_alien.o extra_targets = libsb2.so -libsb2.so: built-in.o ../lua/built-in.o +libsb2.so: built-in.o $(ll_pretty_link_shared_library) |