Permalink
Browse files

support building out-of-tree

  Handle O=

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  • Loading branch information...
1 parent 7f779e7 commit 49d8a0e9c6e32701c7eca91a1204237d3a334e38 @aldot aldot committed Aug 17, 2009
Showing with 683 additions and 433 deletions.
  1. +7 −4 Makefile
  2. +1 −0 Makefile.help
  3. +74 −68 Makefile.in
  4. +30 −23 Makerules
  5. +16 −16 Rules.mak
  6. +64 −23 extra/config/Makefile
  7. +4 −0 extra/config/Makefile.kconfig
  8. +17 −2 extra/config/conf.c
  9. +49 −21 extra/config/confdata.c
  10. +54 −28 extra/config/expr.h
  11. +5 −2 extra/config/lex.zconf.c_shipped
  12. +1 −1 extra/config/lxdialog/check-lxdialog.sh
  13. +1 −1 extra/config/qconf.cc
  14. +5 −2 extra/config/zconf.l
  15. +1 −1 extra/config/zconf.tab.c_shipped
  16. +41 −18 extra/locale/Makefile.in
  17. +143 −150 extra/locale/gen_wc8bit.c
  18. +28 −37 extra/locale/gen_wctype.c
  19. +2 −0 ldso/ldso/Makefile.in
  20. +2 −0 ldso/libdl/Makefile.in
  21. +2 −0 libc/inet/Makefile.in
  22. +2 −0 libc/inet/rpc/Makefile.in
  23. +2 −0 libc/misc/assert/Makefile.in
  24. +2 −0 libc/misc/ctype/Makefile.in
  25. +2 −0 libc/misc/dirent/Makefile.in
  26. +2 −0 libc/misc/elf/Makefile.in
  27. +2 −0 libc/misc/error/Makefile.in
  28. +2 −0 libc/misc/file/Makefile.in
  29. +2 −0 libc/misc/fnmatch/Makefile.in
  30. +2 −0 libc/misc/ftw/Makefile.in
  31. +2 −0 libc/misc/glob/Makefile.in
  32. +2 −0 libc/misc/gnu/Makefile.in
  33. +2 −0 libc/misc/internals/Makefile.in
  34. +2 −0 libc/misc/locale/Makefile.in
  35. +2 −0 libc/misc/mntent/Makefile.in
  36. +2 −0 libc/misc/pthread/Makefile.in
  37. +2 −0 libc/misc/regex/Makefile.in
  38. +2 −0 libc/misc/search/Makefile.in
  39. +2 −0 libc/misc/statfs/Makefile.in
  40. +2 −0 libc/misc/syslog/Makefile.in
  41. +2 −0 libc/misc/sysvipc/Makefile.in
  42. +2 −0 libc/misc/time/Makefile.in
  43. +2 −0 libc/misc/ttyent/Makefile.in
  44. +2 −0 libc/misc/utmp/Makefile.in
  45. +2 −0 libc/misc/wchar/Makefile.in
  46. +2 −0 libc/misc/wctype/Makefile.in
  47. +2 −0 libc/misc/wordexp/Makefile.in
  48. +2 −0 libc/pwd_grp/Makefile.in
  49. +2 −0 libc/signal/Makefile.in
  50. +2 −0 libc/stdio/Makefile.in
  51. +2 −0 libc/stdlib/Makefile.in
  52. +2 −0 libc/stdlib/malloc-simple/Makefile.in
  53. +2 −0 libc/stdlib/malloc-standard/Makefile.in
  54. +2 −0 libc/stdlib/malloc/Makefile.in
  55. +2 −0 libc/string/Makefile.in
  56. +1 −2 libc/sysdeps/linux/Makefile.commonarch
  57. +2 −0 libc/sysdeps/linux/Makefile.in
  58. +2 −0 libc/termios/Makefile.in
  59. +2 −0 libc/unistd/Makefile.in
  60. +2 −0 libcrypt/Makefile.in
  61. +2 −0 libintl/Makefile.in
  62. +2 −0 libm/Makefile.in
  63. +2 −0 libnsl/Makefile.in
  64. +2 −2 libpthread/Makefile.in
  65. +14 −11 libpthread/linuxthreads.old/Makefile.in
  66. +7 −5 libpthread/linuxthreads.old_db/Makefile.in
  67. +16 −11 libpthread/linuxthreads/Makefile.in
  68. +7 −5 libpthread/linuxthreads_db/Makefile.in
  69. +2 −0 libresolv/Makefile.in
  70. +2 −0 librt/Makefile.in
  71. +2 −0 libutil/Makefile.in
  72. +1 −0 utils/Makefile.in
View
@@ -6,9 +6,12 @@
#
top_srcdir=./
-top_builddir=./
-#include $(top_builddir)Rules.mak
-#all: libs
-include Makefile.in
+top_builddir=$(if $(O),$(O),.)/
+export top_builddir
+
+# We do not need built-in implicit rules
+MAKEFLAGS += -r
+
+include $(top_srcdir)Makefile.in
include $(top_srcdir)Makerules
include $(top_srcdir)Makefile.help
View
@@ -42,6 +42,7 @@ help:
@echo ' release - create a distribution tarball'
@echo
@echo 'Environment variables:'
+ @echo ' O=<abspath> - Use <abspath> as object directory'
@echo ' V="" - Quiet build (default)'
@echo ' V=1 - Verbose build'
@echo ' V=2 - Very verbose build'
View
@@ -14,16 +14,21 @@ noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
defconfig allyesconfig allnoconfig \
release dist tags help
-include $(top_builddir)Rules.mak
+include $(top_srcdir)Rules.mak
sub_headers := headers
+ifndef KCONFIG_CONFIG
+KCONFIG_CONFIG := $(top_builddir).config
+endif
+export KCONFIG_CONFIG
+
ifeq ($(HAVE_DOT_CONFIG),y)
all: pregen libs
libs: pregen
# In this section, we need .config
--include .config.cmd
+-include $(top_builddir).config.cmd
else # ifeq ($(HAVE_DOT_CONFIG),y)
@@ -55,16 +60,17 @@ ifeq ($(HAVE_DOT_CONFIG),y)
# have uClibc_config.h as prerequisite but since we _symlink_ the headers
# and do not (?) want to rely on 'make -L' we better update them right here,
# on spot to save us from alot of hazzle.
-include/bits/uClibc_config.h: extra/config/conf .config $(top_srcdir)extra/scripts/conf-header.sh | include/bits
+$(top_builddir)include/bits/uClibc_config.h: $(top_builddir)extra/config/conf $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
@$(disp_gen)
$(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
- $(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@
+ $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
$(Q)$(MAKE) headers-y
# The above doesn't work for threads, though. Just using check-symlinks for now.
# XXX: FIXME: this is ugly
MAKEFLAGS += -L
-include/config/linuxthreads/old.h include/config/linuxthreads/new.h:
+
+$(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
@true
# For the moment, we have to keep re-running this target
@@ -89,17 +95,18 @@ HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common
HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h))
HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
-ALL_HEADERS_COMMON := include/fpu_control.h include/dl-osinfo.h \
- include/hp-timing.h
-ALL_HEADERS_BITS_COMMON := $(addprefix include/bits/,$(HEADERS_BITS_COMMON))
-ALL_HEADERS_BITS_ARCH := $(addprefix include/bits/,$(HEADERS_BITS_ARCH))
+ALL_HEADERS_COMMON := $(top_builddir)include/fpu_control.h \
+ $(top_builddir)include/dl-osinfo.h \
+ $(top_builddir)include/hp-timing.h
+ALL_HEADERS_BITS_COMMON := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON))
+ALL_HEADERS_BITS_ARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_ARCH))
ifneq ($(TARGET_SUBARCH),)
-ALL_HEADERS_BITS_SUBARCH := $(addprefix include/bits/,$(HEADERS_BITS_SUBARCH))
+ALL_HEADERS_BITS_SUBARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_SUBARCH))
else
ALL_HEADERS_BITS_SUBARCH :=
endif
-ALL_HEADERS_SYS_COMMON := $(addprefix include/sys/,$(HEADERS_SYS_COMMON))
-ALL_HEADERS_SYS_ARCH := $(addprefix include/sys/,$(HEADERS_SYS_ARCH))
+ALL_HEADERS_SYS_COMMON := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_COMMON))
+ALL_HEADERS_SYS_ARCH := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_ARCH))
target-headers-sysdep := \
$(ALL_HEADERS_COMMON) \
@@ -109,37 +116,37 @@ target-headers-sysdep := \
$(ALL_HEADERS_SYS_COMMON) \
$(ALL_HEADERS_SYS_ARCH)
-include/fpu_control.h:
+$(top_builddir)include/fpu_control.h:
@$(disp_ln)
- $(Q)[ -r libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
- $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
- $(LN) -fs ../libc/sysdeps/linux/common/$(@F) $@
+ $(Q)[ -r $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
+ $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
+ $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
-include/dl-osinfo.h include/hp-timing.h:
- $(do_ln) ../libc/sysdeps/linux/common/$(@F) $@
+$(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h:
+ $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
$(ALL_HEADERS_BITS_COMMON):
- $(do_ln) ../../libc/sysdeps/linux/common/bits/$(@F) $@
+ $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/bits/$(@F) $@
$(ALL_HEADERS_BITS_ARCH):
- $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
+ $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
ifneq ($(TARGET_SUBARCH),)
$(ALL_HEADERS_BITS_SUBARCH):
- $(do_ln) ../../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
+ $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
endif
ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
$(ALL_HEADERS_SYS_COMMON):
- $(do_ln) ../../libc/sysdeps/linux/common/sys/$(@F) $@
+ $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/sys/$(@F) $@
endif
ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),)
$(ALL_HEADERS_SYS_ARCH):
- $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
+ $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
endif
-$(target-headers-sysdep): | include/bits
+$(target-headers-sysdep): | $(top_builddir)include/bits $(top_builddir)include/sys
sysdep_common_headers-clean:
$(RM) $(ALL_HEADERS_COMMON)
@@ -150,22 +157,21 @@ headers_clean-y += sysdep_common_headers-clean
# libc/sysdeps/linux/Makefile.commonarch to headers-y
headers-y += $(target-headers-sysdep)
-headers: include/bits/uClibc_config.h
-
-pregen: include/bits/sysnum.h headers
+headers: $(top_builddir)include/bits/uClibc_config.h
+subdirs: $(addprefix $(top_builddir),$(subdirs))
+pregen: $(top_builddir)include/bits/sysnum.h headers subdirs
-include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
+$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
$(Q)$(INSTALL) -d $(@D)
@$(disp_gen)
$(Q)set -e; \
- cd $(top_builddir); \
- tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
- [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
- KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
- if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
+ tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
+ [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \
+ KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir="$(top_builddir)" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \
+ if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
$(RM) $$tmp; \
else \
- mv -f $$tmp include/bits/sysnum.h; \
+ mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \
fi
@# Ugly linux specific hack..
$(Q)if grep -q __NR_ $@; then true; else \
@@ -380,70 +386,70 @@ hostutils:
install_hostutils: hostutils
$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install DOTHOST=.host
-include/bits include/config:
- @$(disp_mkdir)
- $(Q)$(INSTALL) -d $@
+$(addprefix $(top_builddir),include/bits include/sys include/config extra/config/lxdialog extra/locale $(subdirs)):
+ $(do_mkdir)
# configuration
# ---------------------------------------------------------------------------
-extra/config/conf extra/config/mconf: | include/config
- $(Q)$(MAKE) -C extra/config $(notdir $@)
+$(top_builddir)extra/config/conf $(top_builddir)extra/config/mconf: | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
+ $(Q)$(MAKE) -C extra/config $(@F)
-menuconfig: extra/config/mconf
- $(Q)./extra/config/mconf extra/Configs/Config.in
+menuconfig: $(top_builddir)extra/config/mconf
+ $(Q)$(top_builddir)extra/config/mconf extra/Configs/Config.in
-config: extra/config/conf
- $(Q)./extra/config/conf extra/Configs/Config.in
+config: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf extra/Configs/Config.in
-oldconfig: extra/config/conf
- $(Q)./extra/config/conf -o extra/Configs/Config.in
+oldconfig: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in
-silentoldconfig: extra/config/conf
- $(Q)./extra/config/conf -s extra/Configs/Config.in
+silentoldconfig: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf -s extra/Configs/Config.in
-randconfig: extra/config/conf
- $(Q)./extra/config/conf -r extra/Configs/Config.in
+randconfig: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf -r extra/Configs/Config.in
-allyesconfig: extra/config/conf
- $(Q)./extra/config/conf -y extra/Configs/Config.in
- $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config
- $(SED) -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config
- $(SED) -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config
- $(SED) -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config
- $(SED) -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
- $(Q)./extra/config/conf -o extra/Configs/Config.in
+allyesconfig: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf -y extra/Configs/Config.in
+ $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
+ -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
+ -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
+ -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
+ -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
+ $(KCONFIG_CONFIG)
+ $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in
-allnoconfig: extra/config/conf
- $(Q)./extra/config/conf -n extra/Configs/Config.in
+allnoconfig: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf -n extra/Configs/Config.in
-defconfig: extra/config/conf
- $(Q)./extra/config/conf -d extra/Configs/Config.in \
+defconfig: $(top_builddir)extra/config/conf
+ $(Q)$(top_builddir)extra/config/conf -d extra/Configs/Config.in \
-D extra/Configs/defconfigs/$(ARCH)
include_clean:
- $(Q)$(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
+ $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h
@set -e; \
for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
- $(RM) include/sys/$$i; \
+ $(RM) $(top_builddir)include/sys/$$i; \
done; \
if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
- $(RM) include/sys/$$i; \
+ $(RM) $(top_builddir)include/sys/$$i; \
done; \
fi
clean: include_clean
- $(Q)$(RM) -r lib include/bits
+ $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits
@$(MAKE) -C utils utils_clean
+$(MAKE) -s -C test clean
- @$(RM) include/linux include/asm*
+ @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm*
$(Q)$(RM) $(top_builddir)extra/scripts/unifdef
$(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
distclean: clean
-find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
- $(RM) .config .config.old .config.cmd
- $(RM) extra/locale/*.tgz
+ $(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd
+ $(RM) $(top_builddir)extra/locale/*.tgz
$(MAKE) -C extra/config distclean
dist release:
View
@@ -6,10 +6,10 @@
PHONY := FORCE
-.PHONY: dummy $(PHONY) \
+.PHONY: dummy $(PHONY) subdirs \
all check test $(clean_targets) \
config dist menuconfig oldconfig release \
- subdirs utils help
+ utils help
# order is important, the stripping uses STRIP_FLAGS for lib-so, but not for lib-a
ifeq ($(HAVE_SHARED),y)
@@ -54,6 +54,9 @@ headers-y: $(headers-y)
MAKEFLAGS += --no-print-directory
SHELL_SET_X := set +x
+define rel_srcdir
+ $(shell $(CONFIG_SHELL) $(top_srcdir)/extra/scripts/relative_path.sh $(@D) .)
+endef
ifneq ($(findstring s,$(MAKEFLAGS)),)
export MAKE_IS_SILENT := y
SECHO := -@false
@@ -72,7 +75,7 @@ Q := @
endif
endif
-show_objs = $(subst ../,,$@)
+show_objs = $(subst $(top_builddir),,$(subst ../,,$@))
pur_disp_compile.c = echo " "CC $(show_objs)
pur_disp_compile.i = echo " "CPP $(show_objs)
@@ -88,10 +91,10 @@ pur_disp_strip = echo " "STRIP $(STRIP_FLAGS) $@
pur_disp_t_strip = echo " "STRIP $(STRIP_FLAGS) $@
pur_disp_ar = echo " "AR $(ARFLAGS) $@
pur_disp_ld = echo " "LD $(1)
-pur_disp_ln = echo " "LN $@
-pur_disp_mkdir = echo " "MKDIR $@
-pur_disp_gen = echo " "GEN $@
-pur_disp_unifdef = echo " "UNIFDEF $@
+pur_disp_ln = echo " "LN $(show_objs)
+pur_disp_mkdir = echo " "MKDIR $(show_objs)
+pur_disp_gen = echo " "GEN $(show_objs)
+pur_disp_unifdef = echo " "UNIFDEF $(show_objs)
pur_disp_rm = echo " "CLEAN $(@:_clean=)
sil_disp_compile.c = true
@@ -205,6 +208,10 @@ define do_ln
$(Q)$(LN) -fs
endef
+define do_mkdir
+ @$(disp_mkdir)
+ $(Q)$(INSTALL) -d $@
+endef
define do_rm
@$(disp_rm)
@@ -237,8 +244,8 @@ define compile.u
@$(disp_compile.u) ; $(cmd_compile.u)
@$(disp_t_strip)
endef
-cmd_hcompile.u = $(HOSTCC) $^ $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
-cmd_hcompile.o = $(HOSTCC) $^ $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
+cmd_hcompile.u = $(HOSTCC) $(filter-out $(PHONY),$^) $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
+cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
define link.so
$(Q)$(INSTALL) -d $(dir $@)
@@ -294,20 +301,20 @@ endef
CFLAGS-.os+=$(PICFLAG)
CFLAGS-.oS+=$(PICFLAG) -DSHARED
-%.o: %.c FORCE ; $(compile.c)
-%.os: %.c FORCE ; $(compile.c)
-%.oS: %.c FORCE ; $(compile.c)
-%.o: %.S FORCE ; $(compile.S)
-%.os: %.S FORCE ; $(compile.S)
-%.oS: %.S FORCE ; $(compile.S)
-%.o: %.s FORCE ; $(compile.S)
-%.os: %.s FORCE ; $(compile.S)
-%.oS: %.s FORCE ; $(compile.S)
-%.i: %.c FORCE ; $(compile.i)
-%.i: %.S FORCE ; $(compile.i)
-%.s: %.c FORCE ; $(compile.s)
-%.s: %.S FORCE ; $(compile.s)
-%.dep:
+$(top_builddir)%.o: $(top_srcdir)%.c FORCE ; $(compile.c)
+$(top_builddir)%.os: $(top_srcdir)%.c FORCE ; $(compile.c)
+$(top_builddir)%.oS: $(top_srcdir)%.c FORCE ; $(compile.c)
+$(top_builddir)%.o: $(top_srcdir)%.S FORCE ; $(compile.S)
+$(top_builddir)%.os: $(top_srcdir)%.S FORCE ; $(compile.S)
+$(top_builddir)%.oS: $(top_srcdir)%.S FORCE ; $(compile.S)
+$(top_builddir)%.o: $(top_srcdir)%.s FORCE ; $(compile.S)
+$(top_builddir)%.os: $(top_srcdir)%.s FORCE ; $(compile.S)
+$(top_builddir)%.oS: $(top_srcdir)%.s FORCE ; $(compile.S)
+$(top_builddir)%.i: $(top_srcdir)%.c FORCE ; $(compile.i)
+$(top_builddir)%.i: $(top_srcdir)%.S FORCE ; $(compile.i)
+$(top_builddir)%.s: $(top_srcdir)%.c FORCE ; $(compile.s)
+$(top_builddir)%.s: $(top_srcdir)%.S FORCE ; $(compile.s)
+$(top_builddir)%.dep:
$(top_builddir)lib/interp.c: | $(sub_headers)
$(Q)$(INSTALL) -d $(dir $@)
Oops, something went wrong.

0 comments on commit 49d8a0e

Please sign in to comment.