I need some help with this makefile (never made one before).
I have a c++ program, and here is how I compile an run it on unix (works fine this way):
g++ TestProg.cpp -lpthread -lrt
./a.out
I'm suppose to create a makefile for this. I've read through some tutorials and examples, but I can't get it to work. This is what I have now:
I don't know if this matters, but here are the headers included in TestProg.cpp:Code:prog1: TestProg.cpp g++ -o prog1 TestProg.cpp -lpthread -lrt
#include <iostream>
#include <pthread.h>
#include <semaphore.h>
#include <stdio.h>
#include <time.h>
#include <fstream>
When I go to use it:
make -f makefile.txt
It says:
' ake: Fatal error: Don't know how to make target 'TestProg.cpp
Any ideas?
Thanks.