# file: lecture_19/Makefile # # revision history: # # 20210302 (JP): updated to lecture 19 # 20180823 (TD): created a debug target, moved the second command # for myprog.exe target to the debug target. # 20180803 (TD): added the second command for the myprog.exe target to produce # a file with debugging information # 20180724 (JP): initial version # # define a target for the application # all: example.exe # define a target to link the application # example.exe: example.o myfuncts_00.o g++ -g -lm example.o myfuncts_00.o -o example.exe # define a debug target to compile with -ggdb3 # debug: g++ -g example.cc myfuncts_00.cc myfuncts_01.cc -o example.gdb # define targets to compile the source code # example.o: example.cc example.h Makefile g++ -g -c example.cc -o example.o myfuncts_00.o: myfuncts_00.cc example.h Makefile g++ -g -c myfuncts_00.cc -o myfuncts_00.o # define a target to clean the directory # clean: rm -f *.o *.exe # # end of file