I have following makefile:
main.o: ServerSocket/main.cpp ../Shared/socket.h
g++ -c ServerSocket/main.cpp -lstdc++
DriveInfo.o: ServerSocket/DriveInfo.cpp ServerSocket/DriveInfo.h ServerSocket/Consts.h
g++ -c ServerSocket/DriveInfo.cpp -lstdc++
ProcessInfo.o: ServerSocket/ProcessInfo.cpp ServerSocket/ProcessInfo.h ServerSocket/Consts.h
g++ -c ServerSocket/ProcessInfo.cpp -lstdc++
thread_pool.o: ServerSocket/thread_pool.cpp ServerSocket/thread_pool.h
DriveInfo.o ProcessInfo.o thread_pool.o
server: main.o
g++ -o server main.o
DriveInfo.o ProcessInfo.o thread_pool.o
Problem is only one command of that file is being executed, so if I want to execute the next one< I have to delete or comment previous command. What is wrong with this makefile?