From: Philipp Hachtmann Date: Tue, 17 May 2016 12:10:06 +0000 (+0200) Subject: ldc2: Cosmetic fixes and support for compiler orverride X-Git-Url: http://gitweb.hachti.de/?a=commitdiff_plain;h=0f7b7e093c962c7883622efd53cf74597d433799;p=h316.git ldc2: Cosmetic fixes and support for compiler orverride Signed-off-by: Philipp Hachtmann --- diff --git a/pc-tools/ldc2/Makefile b/pc-tools/ldc2/Makefile index a2b218c..4682d17 100644 --- a/pc-tools/ldc2/Makefile +++ b/pc-tools/ldc2/Makefile @@ -2,11 +2,12 @@ APP_NAME=ldc2 APP_OBJECTS= main.o silent_code.o configuration_manager.o tool.o config.o CCFLAGS+=-Wall - BUILD_STAMP="\"`uname -a`\"" VERSION="\"1.0\"" BUILD_DATE="\"`date` \"" +CXX?=g++ + CCFLAGS+=-D BUILD_STAMP=$(BUILD_STAMP) -D VERSION=$(VERSION) -D BUILD_DATE=$(BUILD_DATE) BLOCK_OBJECTS=tape_block.o eot_block.o data_block.o broken_block.o\ @@ -18,7 +19,6 @@ BLOCK_OBJECTS=tape_block.o eot_block.o data_block.o broken_block.o\ data_block_0_label_extractor.o data_block_1.o data_block_2.o\ data_block_3.o data_block_4.o data_block_5.o \ data_block_6.o data_block_7.o - OBJECTS=$(BLOCK_OBJECTS) $(APP_OBJECTS) @@ -35,14 +35,13 @@ APP_SOURCES=$(foreach obj, $(OBJECTS:.o=.cpp),$(SRC_DIR)/$(obj)) %.dep : $(SRC_DIR)/%.cpp @ echo Building dependencies for $<. - @$(SHELL) -c "g++ -M $<" | awk 'BEGIN {N=0}{if(N==0)printf("%s %s\n","$@",$$0);else printf("%s\n", $$0);N+=1;}' > $@ - + @$(SHELL) -c "$(CXX) -M $<" | awk 'BEGIN {N=0}{if(N==0)printf("%s %s\n","$@",$$0);else printf("%s\n", $$0);N+=1;}' > $@ %.o : $(SRC_DIR)/%.cpp %.dep - g++ -c $(CCFLAGS) -o $@ $< + $(CXX) -c $(CCFLAGS) -o $@ $< $(APP_NAME) : $(OBJECTS) - g++ -o$@ $^ + $(CXX) -o$@ $^ saustall: $(OBJECTS:.o=.dep) diff --git a/pc-tools/ldc2/src/main.cpp b/pc-tools/ldc2/src/main.cpp index a8d0a4a..8b7da87 100644 --- a/pc-tools/ldc2/src/main.cpp +++ b/pc-tools/ldc2/src/main.cpp @@ -116,8 +116,8 @@ void read_tape(){ while(read_ahead){ - bool err_checksum=false; //! Checksum error flag. - bool err_integrity=false; //! Integrity error flag. + // bool err_checksum=false; //! Checksum error flag. + // bool err_integrity=false; //! Integrity error flag. bool warning=false; //! Warning flag. bool error=false; //! Error flag. @@ -146,7 +146,7 @@ void read_tape(){ catch(tape_block::eof_illegal_exception &e){ block=e.get_block(); - err_integrity=true; + // err_integrity=true; read_ahead=false; if (cfg_ignore_block_errors){ message="Warning: Block integrity check failed!\n"; @@ -160,7 +160,7 @@ void read_tape(){ catch(tape_block::checksum_error_exception &e){ block=e.get_block(); - err_checksum=true; + // err_checksum=true; if (cfg_ignore_checksum_errors){ message="Warning: Block checksum wrong!\n"; warning=true;