[LinuxBIOS] r357 - in LinuxBIOSv3/util: . lar

svn at openbios.org svn at openbios.org
Sat Jun 16 19:07:24 CEST 2007


Author: stepan
Date: 2007-06-16 19:07:24 +0200 (Sat, 16 Jun 2007)
New Revision: 357

Modified:
   LinuxBIOSv3/util/Makefile
   LinuxBIOSv3/util/lar/Makefile
Log:
in order to integrate compression into lar, it needs some makefile splits to
keep the c++ compiler happy (lzma is c++ code and thus must be linked by a
c++ compiler).

The Makefiles are changed so lar is build with HOSTCC but linked with HOSTCXX
(so the c++ library is picked up)

Signed-off-by: PatrickGeorgi <patrick at georgi-clan.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: LinuxBIOSv3/util/Makefile
===================================================================
--- LinuxBIOSv3/util/Makefile	2007-06-16 14:37:02 UTC (rev 356)
+++ LinuxBIOSv3/util/Makefile	2007-06-16 17:07:24 UTC (rev 357)
@@ -19,10 +19,9 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# This stuff is always needed.
+# main utilities
 include util/dtc/Makefile
 include util/kconfig/Makefile
-include util/lar/Makefile
 include util/options/Makefile
 
 # Parts used by LinuxBIOS.
@@ -32,3 +31,5 @@
 include util/lzma/Makefile
 include util/nrv2b/Makefile
 
+# LinuxBIOS archiver
+include util/lar/Makefile

Modified: LinuxBIOSv3/util/lar/Makefile
===================================================================
--- LinuxBIOSv3/util/lar/Makefile	2007-06-16 14:37:02 UTC (rev 356)
+++ LinuxBIOSv3/util/lar/Makefile	2007-06-16 17:07:24 UTC (rev 357)
@@ -18,27 +18,35 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
 ##
 
-LZMA_OBJ := $(obj)/util/lzma/LZMAEncoder.o $(obj)/util/lzma/LZInWindow.o
-LZMA_OBJ += $(obj)/util/lzma/RangeCoderBit.o $(obj)/util/lzma/StreamUtils.o
-LZMA_OBJ += $(obj)/util/lzma/OutBuffer.o $(obj)/util/lzma/Alloc.o
-LZMA_OBJ += $(obj)/util/lzma/CRC.o
+LAROBJ := lar.o create.o extract.o list.o lib.o bootblock.o
 
-SOURCE := lar.c create.c extract.c list.c lib.c bootblock.c
+LARDIR := lardir
 
 ifeq ($(CONFIG_COMPRESSION_LZMA),y)
 COMPRESSOR := $(LZMA_OBJ) $(obj)/util/lzma/lzma-compress.o
+LARDIR     += lzmadir
 endif
 
 ifeq ($(CONFIG_COMPRESSION_NRV2B),y)
 COMPRESSOR += $(obj)/util/nrv2b/nrv2b-compress.o
+LARDIR     += nrv2bdir
 endif
 
-$(obj)/util/lar/lar: $(patsubst %,$(src)/util/lar/%,$(SOURCE)) $(COMPRESSOR)
+LAROBJ_ABS := $(patsubst %,$(obj)/util/lar/%,$(LAROBJ))
+
+lardir:
+	$(Q)printf "  BUILD   LAR\n"
 	$(Q)mkdir -p $(obj)/util/lar
+
+$(obj)/util/lar/lar: $(CDIR) $(LAROBJ_ABS) $(COMPRESSOR)
 	$(Q)printf "  HOSTCXX $(subst $(shell pwd)/,,$(@))\n"
-	$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $^
+	$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $(ABS_OBJ) $(COMPRESSOR)
 
+$(obj)/util/lar/%.o: $(src)/util/lar/%.c
+	$(Q)printf "  HOSTCC  $(subst $(shell pwd)/,,$(@))\n"
+	$(Q)$(HOSTCC) $(HOSTCFLAGS) -c $< -o $@
 
+
 # -----------------------------------------------------------------------------
 # Stuff below this line is for debugging purposes only.
 





More information about the coreboot mailing list