Skip to content
Snippets Groups Projects
makefile 599 B
Newer Older
  • Learn to ignore specific revisions
  • vcday's avatar
    vcday committed
    # the compiler: gcc for C program, define as g++ for C++
      CC = g++
    
    vcday's avatar
    vcday committed
      # compiler flags:
      #  -g    adds debugging information to the executable file
      #  -Wall turns on most, but not all, compiler warnings
      CFLAGS  = -std=c++11 -c
    
    vcday's avatar
    vcday committed
      # the build target executable:
      TARGET = indexer/tests/test
    
    vcday's avatar
    vcday committed
      all: $(TARGET)
    
    vcday's avatar
    vcday committed
      $(TARGET): $(TARGET).cpp
    		$(CC) $(CFLAGS) $(TARGET).cpp -o $(TARGET)
      clean:
    		$(RM) $(TARGET)
    
    vcday's avatar
    vcday committed
    test:
    	make all
    	    chmod a+x indexer/tests/test
    		./indexer/tests/test indexer/tests/source/test1.txt > indexer/tests/source/test1out.txt
    		diff test1out.txt test1.out.correct.txt