nochmal Makefile frage target ".cpp.o"



  • Hallo,

    wennn ich...

    #3
    .cpp.o:	
    		$(CCOMPILE) $(CCFLAGS) $(DEBUG) -I$(SRC_FILES) -I$(H_FILES) -I$(MYLIBS)  $*.cpp -c
    

    erzeuge ich meine .o Dateien genaus als würde ich...

    OBJ = file.o \
    	main.o
    
    #1
    main.o: main.h
        $(CCOMPILE) $(CCFLAGS) $(DEBUG) -I$(SRC_FILES) -I$(H_FILES) -I$(MYLIBS) main.cpp -c
    
    #2
    file.o: timestamp.h\
         file.h \
         os.h
        $(CCOMPILE) $(CCFLAGS) $(DEBUG) -I$(SRC_FILES) -I$(H_FILES) -I$(MYLIBS) file.cpp -c
    

    ich kann auch "#1" und "#2" weglassen wenn ich "#3" (implizite Regel) nutze...
    Weil ich kein "$<" drin habe... Weshalb?

    Gruß
    Franky


Anmelden zum Antworten