Skip to content
Snippets Groups Projects
Select Git revision
  • 29b254fe343d16c37a7804bf946e74babbef0d4c
  • main default protected
  • develop
3 results

makefile

Blame
  • dario.genga's avatar
    dario.genga authored
    The make command was running the tests but not compiling the project.
    Also added a missing matrix destroy to free the memory.
    29b254fe
    History
    makefile 335 B
    LIB=-lm
    CC=gcc -Wall -Wextra -g
    
    matrix: matrix.o main.o
    	$(CC) $^ -fsanitize=address -fsanitize=leak -o $@ $(LIB)
    
    run_tests: tests
    	./$<
    
    tests: test.o matrix.o
    	$(CC) $^ -fsanitize=address -fsanitize=leak -o $@ $(LIB)
    
    matrix.o: matrix.c matrix.h
    	$(CC) -c $< $(LIB)
    main.o: main.c
    	$(CC) -c $< $(LIB)
    clean:
    	rm -f *.o matrix tests