Browse Source

Remove broken objdir / srcdir support

The dtc makefiles have support for building into a separate directory from
the sources... except that it's broken and probably always has been.

Remove the pretense.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 6 years ago
parent
commit
f9c0a425b6
  1. 26
      Makefile
  2. 2
      libfdt/Makefile.libfdt
  3. 12
      pylibfdt/Makefile.pylibfdt

26
Makefile

@ -182,23 +182,22 @@ endif @@ -182,23 +182,22 @@ endif
#
# Rules for libfdt
#
LIBFDT_objdir = libfdt
LIBFDT_srcdir = libfdt
LIBFDT_archive = $(LIBFDT_objdir)/libfdt.a
LIBFDT_lib = $(LIBFDT_objdir)/libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT)
LIBFDT_include = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_INCLUDES))
LIBFDT_version = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_VERSION))
LIBFDT_dir = libfdt
LIBFDT_archive = $(LIBFDT_dir)/libfdt.a
LIBFDT_lib = $(LIBFDT_dir)/libfdt-$(DTC_VERSION).$(SHAREDLIB_EXT)
LIBFDT_include = $(addprefix $(LIBFDT_dir)/,$(LIBFDT_INCLUDES))
LIBFDT_version = $(addprefix $(LIBFDT_dir)/,$(LIBFDT_VERSION))

include $(LIBFDT_srcdir)/Makefile.libfdt
include $(LIBFDT_dir)/Makefile.libfdt

.PHONY: libfdt
libfdt: $(LIBFDT_archive) $(LIBFDT_lib)

$(LIBFDT_archive): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
$(LIBFDT_lib): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
$(LIBFDT_archive): $(addprefix $(LIBFDT_dir)/,$(LIBFDT_OBJS))
$(LIBFDT_lib): $(addprefix $(LIBFDT_dir)/,$(LIBFDT_OBJS))

ifneq ($(DEPTARGETS),)
-include $(LIBFDT_OBJS:%.o=$(LIBFDT_objdir)/%.d)
-include $(LIBFDT_OBJS:%.o=$(LIBFDT_dir)/%.d)
endif

# This stops make from generating the lex and bison output during
@ -263,13 +262,12 @@ dist: @@ -263,13 +262,12 @@ dist:
#
# Rules for pylibfdt
#
PYLIBFDT_srcdir = pylibfdt
PYLIBFDT_objdir = pylibfdt
PYLIBFDT_dir = pylibfdt

include $(PYLIBFDT_srcdir)/Makefile.pylibfdt
include $(PYLIBFDT_dir)/Makefile.pylibfdt

.PHONY: pylibfdt
pylibfdt: $(PYLIBFDT_objdir)/_libfdt.so
pylibfdt: $(PYLIBFDT_dir)/_libfdt.so

#
# Release signing and uploading

2
libfdt/Makefile.libfdt

@ -12,4 +12,4 @@ LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o) @@ -12,4 +12,4 @@ LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)

libfdt_clean:
@$(VECHO) CLEAN "(libfdt)"
rm -f $(STD_CLEANFILES:%=$(LIBFDT_objdir)/%)
rm -f $(STD_CLEANFILES:%=$(LIBFDT_dir)/%)

12
pylibfdt/Makefile.pylibfdt

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
# Makefile.pylibfdt
#

PYLIBFDT_srcs = $(PYLIBFDT_srcdir)/libfdt.i
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
PYLIBFDT_srcs = $(PYLIBFDT_dir)/libfdt.i
PYMODULE = $(PYLIBFDT_dir)/_libfdt.so
PYLIBFDT_CLEANFILES_L = libfdt_wrap.c libfdt.py *.pyc *.so
PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_objdir)/%)
PYLIBFDT_CLEANFILES = $(PYLIBFDT_CLEANFILES_L:%=$(PYLIBFDT_dir)/%)
PYLIBFDT_CLEANDIRS_L = build __pycache__
PYLIBFDT_CLEANDIRS = $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_objdir)/%)
PYLIBFDT_CLEANDIRS = $(PYLIBFDT_CLEANDIRS_L:%=$(PYLIBFDT_dir)/%)

SETUP = $(PYLIBFDT_srcdir)/setup.py
SETUP = $(PYLIBFDT_dir)/setup.py
SETUPFLAGS =

ifndef V
@ -17,7 +17,7 @@ endif @@ -17,7 +17,7 @@ endif

$(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) $(VERSION_FILE)
@$(VECHO) PYMOD $@
$(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=../$(PYLIBFDT_objdir)
$(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext --build-lib=../$(PYLIBFDT_dir)

install_pylibfdt: $(PYMODULE)
@$(VECHO) INSTALL-PYLIB

Loading…
Cancel
Save