[build] Allow building against a zlib in a non-standard location
authorGeoff Lywood <glywood@vmware.com>
Thu, 27 May 2010 21:27:20 +0000 (14:27 -0700)
committerJoshua Oreman <oremanj@rwcr.net>
Fri, 28 May 2010 23:23:27 +0000 (16:23 -0700)
Support a ZLIB_DIR= variable on the make command line.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
src/Makefile
src/Makefile.housekeeping

index c02acb9..7e826e7 100644 (file)
@@ -46,6 +46,7 @@ ICCFIX                := ./util/iccfix
 DOXYGEN                := doxygen
 BINUTILS_DIR   := /usr
 BFD_DIR                := $(BINUTILS_DIR)
+ZLIB_DIR       := /usr
 
 ###############################################################################
 #
index 40bd878..bf16fde 100644 (file)
@@ -895,8 +895,9 @@ CLEANUP += $(ZBIN)
 # The EFI image converter
 #
 ELF2EFI_CFLAGS := -I$(BINUTILS_DIR)/include -I$(BFD_DIR)/include \
-                  -idirafter include -L$(BINUTILS_DIR)/lib -L$(BFD_DIR)/lib \
-                  -lbfd -liberty -lz
+                  -I$(ZLIB_DIR)/include -idirafter include \
+                  -L$(BINUTILS_DIR)/lib -L$(BFD_DIR)/lib \
+                  -L$(ZLIB_DIR)/lib -lbfd -liberty -lz
 
 $(ELF2EFI32) : util/elf2efi.c $(MAKEDEPS)
        $(QM)$(ECHO) "  [HOSTCC] $@"