Here's my makefile
all: main.o fileparam.o
g++ -g $(LIBPATH) $(LIBS) file_parameters.o main.o -o test
main.o: main.cpp
g++ -g -Wall $(INCPATH) main.cpp -c
fileparam.o: file_parameters.cpp file_parameters.h
g++ -g -Wall file_parameters.cpp -c
$(LIBPATH) $(LIBS) points to the libraries to be included and $(INCPATH) points to other included files
For some reason it recompiles file_parameters.o every time I make the program, and I was wondering where I screwed up. Thanks!
Edit: It does not recompile main.o every time