These changes allow manually overridden SRCDIR (current source
directory) and TOPDIR (top of source tree) to separate the build directory from the source tree. Signed-off-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
This commit is contained in:
parent
7bcb832680
commit
28cfdd48b9
@ -34,7 +34,7 @@
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
|
||||
SRCDIR = .
|
||||
SRCDIR = $(shell pwd)
|
||||
|
||||
VPATH = $(SRCDIR)
|
||||
|
||||
@ -69,18 +69,21 @@ mkvars:
|
||||
@echo prefix=$(prefix)
|
||||
@echo PREFIX=$(PREFIX)
|
||||
@echo RANLIB=$(RANLIB)
|
||||
@echo SRCDIR=$(SRCDIR)
|
||||
@echo TOPDIR=$(TOPDIR)
|
||||
|
||||
$(SUBDIRS):
|
||||
mkdir -p $@
|
||||
$(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH)
|
||||
$(MAKE) -C $@ -f $(SRCDIR)/$@/Makefile SRCDIR=$(SRCDIR)/$@ ARCH=$(ARCH)
|
||||
|
||||
clean:
|
||||
rm -f *~
|
||||
@for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
|
||||
@for d in $(SUBDIRS); do $(MAKE) -C $$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d clean; done
|
||||
|
||||
install:
|
||||
@for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
|
||||
@for d in $(SUBDIRS); do \
|
||||
mkdir -p $$d; \
|
||||
$(MAKE) -C $$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d install; done
|
||||
|
||||
.PHONY: $(SUBDIRS) clean depend
|
||||
|
||||
|
@ -61,12 +61,12 @@ install:
|
||||
$(INSTALL) -m 644 $(TARGETS) $(INSTALLROOT)/$(LIBDIR)
|
||||
ifneq (,$(findstring FreeBSD,$(OS)))
|
||||
ifeq ($(ARCH),x86_64)
|
||||
$(INSTALL) -m 644 elf_$(ARCH)_fbsd_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
$(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_fbsd_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
else
|
||||
$(INSTALL) -m 644 elf_$(ARCH)_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
$(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(INSTALL) -m 644 elf_$(ARCH)_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
$(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_efi.lds $(INSTALLROOT)/$(LIBDIR)
|
||||
endif
|
||||
|
||||
include $(SRCDIR)/../Make.rules
|
||||
|
@ -16,12 +16,12 @@ install:
|
||||
mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi
|
||||
mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol
|
||||
mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
|
||||
$(INSTALL) -m 644 *.h $(INSTALLROOT)$(PREFIX)/include/efi
|
||||
$(INSTALL) -m 644 protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol
|
||||
$(INSTALL) -m 644 $(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
|
||||
$(INSTALL) -m 644 $(SRCDIR)/*.h $(INSTALLROOT)$(PREFIX)/include/efi
|
||||
$(INSTALL) -m 644 $(SRCDIR)/protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol
|
||||
$(INSTALL) -m 644 $(SRCDIR)/$(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
|
||||
ifeq ($(ARCH),ia64)
|
||||
mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
|
||||
$(INSTALL) -m 644 protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
|
||||
$(INSTALL) -m 644 $(SRCDIR)/protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
|
||||
endif
|
||||
|
||||
include $(SRCDIR)/../Make.rules
|
||||
|
Loading…
Reference in New Issue
Block a user