*** empty log message ***
authorhachti <hachti>
Mon, 20 Nov 2006 08:27:06 +0000 (08:27 +0000)
committerhachti <hachti>
Mon, 20 Nov 2006 08:27:06 +0000 (08:27 +0000)
pc-tools/ldc2/Makefile
pc-tools/ldc2/doc/Makefile
pc-tools/ldc2/src/data_block_0_0.cpp
pc-tools/ldc2/src/data_block_0_50.cpp
pc-tools/ldc2/src/main.cpp

index d50c2ee76ed9c324bdfaae6f0064c08560b86d82..3a99fe5d38e7e7e7a7e8333ec66c2a2a9010a702 100644 (file)
@@ -1,32 +1,45 @@
 APP_NAME=ldc2
-APP_OBJECTS= main.o  silent_code.o 
-
-APP_OBJECTS+= tape_block.o eot_block.o discard_block.o\
+APP_OBJECTS= main.o  silent_code.o argument_reader.o
+CCFLAGS+=-Wall
+BLOCK_OBJECTS=data_block_0_10.o data_block_0_14.o data_block_0_1.o data_block_0_24.o\
+              data_block_0_2.o data_block_0_30.o data_block_0_3.o data_block_0_4.o\
+              data_block_0_50.o data_block_0_54.o data_block_0_60.o data_block_0_44.o\
+              data_block_0_64.o tape_block.o eot_block.o discard_block.o\
               data_block.o data_block_0.o data_block_0_0.o\
-              data_block_0_label_extractor.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 \
+      
 
-APP_OBJECTS+= data_block_0_10.o data_block_0_14.o data_block_0_1.o data_block_0_24.o\
-              data_block_0_2.o data_block_0_30.o data_block_0_3.o data_block_0_4.o\
-              data_block_0_50.o data_block_0_54.o data_block_0_60.o data_block_0_44.o
+APP_OBJECTS+=$(BLOCK_OBJECTS)
 
 SRC_DIR=src
 
 default: $(APP_NAME)
 
-#All objects depend on all headers. simple but works
-*.o: $(SRC_DIR)/*.hh
+APP_SOURCES=$(foreach obj, $(APP_OBJECTS:.o=.cpp),$(SRC_DIR)/$(obj))
+
+##All objects depend on all headers. simple but works
+#*.o: $(SRC_DIR)/*.hh
+
+%.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;}' >  $@
+       
 
-%.o : $(SRC_DIR)/%.cpp
-       g++ -c -o$@ $<
+%.o : $(SRC_DIR)/%.cpp %.dep
+       g++ -c $(CCFLAGS) -o $@ $<
 
 $(APP_NAME) : $(APP_OBJECTS)
-       g++ -o$@ $^
+       @g++ -o$@ $^
+
+saustall: $(APP_OBJECTS:.o=.dep)
 
 clean: 
-       rm -rf $(APP_NAME) *.o doxy/ $(SRC_DIR)/*~ ul_timestamp
-       $(MAKE) -C doc clean
+       @rm -rf $(APP_NAME) *.o doxy/ $(SRC_DIR)/*~ ul_timestamp *.dep
+       @$(MAKE) -C doc clean
 
-doxy/timestamp: $(SRC_DIR)/*
+doxy/timestamp: $(APP_OBJECTS)
        @ if [ ! -d doxy ]; then mkdir doxy; fi
        @doxygen Doxyfile
        touch $@
@@ -46,3 +59,9 @@ doc:
 all: $(APP_NAME) doxy doc
 
 .PHONY: all clean doxy upload docdata_block_0_0.o
+
+.PRECIOUS: *.dep
+
+#$(APP_OBJECTS:.o=.d)
+
+include $(wildcard *.dep)
index 22eb7cedb0d62fa8c82ef391262349a6c0725c97..00999b27b170fbc9f73c4d5af866a26b07410bbb 100644 (file)
@@ -16,4 +16,4 @@ main.dvi: *.tex *.bib
        cat ps.gnu $< | gnuplot > $@ 
 
 clean:
-       rm -f *.dvi *.ps *.pdf *.toc *~ *.log *.aux *.bbl *.blg *.lof *.lot
+       @rm -f *.dvi *.ps *.pdf *.toc *~ *.log *.aux *.bbl *.blg *.lof *.lot
index ece243dad8f19b108a1cf7a84418c806a4c20918..5fc41eec639061c39919734ac8ed86ffe7a86e2d 100644 (file)
@@ -16,7 +16,7 @@ data_block_0_0::data_block_0_0(data_block_0 & org)
 vector<string> data_block_0_0::get_description(){
   vector<string> result;
   vector<string> labels=get_labels();
-  for (int i=0; i<labels.size();i++){
+  for (unsigned int i=0; i<labels.size();i++){
     if (i==0) result.insert(result.end(),
                            labels[i]+"     "+get_typestring()+"Subprogram Name");
     else 
index 4954f83da6cd0a7aa472884dceebef4d7c733e04..5fdf2150e67ea21c2ebf87915b9fe14ffdc0f90a 100644 (file)
@@ -16,7 +16,7 @@ data_block_0_50::data_block_0_50(data_block_0 & org)
 vector<string> data_block_0_50::get_description(){
   vector<string> result;
   vector<string> labels=get_labels();
-  for (int i=0; i<labels.size();i++){
+  for (unsigned int i=0; i<labels.size();i++){
     if (i==0) result.insert(result.end(),
                            labels[i]+"     "+get_typestring()+"Subprogram Entry Point Definition");
     else 
index 237d9971aaf52f397df9c8aa982964369df7fb96..0c9cea870bd3cbc9a20daa0e9ad227838b45b00b 100644 (file)
@@ -9,7 +9,7 @@
 #include "tape_block.hh"
 #include "data_block.hh"
 
-#include "argread.hh"
+#include "argument_reader.hh"
 
 using namespace std;
 
@@ -34,7 +34,7 @@ int main(int argc, char ** args){
   string name="Philipp";
   string filename;
 
-  argreader ar("ldc2");
+  argument_reader ar("ldc2");
   ar.add_param("h","help","Give help",&help_needed);
   ar.add_param("n","name=","Enter other name",&name_set,&name,"<name>");
   ar.add_param("n","name=","Enter other name",&name_set,&name,"<name>");
@@ -57,7 +57,7 @@ int main(int argc, char ** args){
   ar.add_param("n","name=","Enter other name",&name_set,&name,"<name>");
   ar.add_param("n","name=","Enter other name",&name_set,&name,"<name>");
   ar.add_param("n","name=","Enter other name",&name_set,&name,"<name>");
-  ar.add_free_param("<input-blaaaaaaaaaaaaaaa-filename>","File to read data from",&file_set,&filename);
+  ar.add_argument("<input-blaaaaaaaaaaaaaaa-filename>","File to read data from",&file_set,&filename);
                   
   dump_vector(ar.read_args(argc,args));