Hi,,
i have run successfully a code using a makefile.
i need also to active the debug for this code. So where do i put the "-g" option? is it in each line that has gcc command ? i also want to activate the profiling using gpprof command hence i have to add the "-pg" option, where should it be as well?

here is my makefile:
Code:
all:	mycode

main.o:   main.c main.h
	gcc -c main.c

task.o:	task.c task.h
	gcc -c task.c
	 
mycode:	 main.o task.o 
	gcc -o mycode main.o task.o

clean: 
	rm *.o mycode
thanks