cramfs depends on host-zlib, so it must be built prior to cramfs.
Moreover, we need to pass the HOST_CFLAGS and HOST_LDFLAGS variables,
otherwise it doesn't find zlib in $(HOST_DIR).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/patch-kernel.sh $(CRAMFS_DIR) target/cramfs/ cramfs\*.patch
$(CRAMFS_DIR)/mkcramfs: $(CRAMFS_DIR)
- $(MAKE) CFLAGS="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -C $(CRAMFS_DIR)
+ $(MAKE) CFLAGS="$(HOST_CFLAGS) -Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS="$(HOST_LDFLAGS)" -C $(CRAMFS_DIR)
touch -c $@
-cramfs: $(CRAMFS_DIR)/mkcramfs
+cramfs: host-zlib $(CRAMFS_DIR)/mkcramfs
cramfs-source: $(DL_DIR)/$(CRAMFS_SOURCE)