I want to change this command line compile code:
gcc -Wall project.c -o outputFile -lposix4
to the following makefile:
However, I don't know how to get that library added to my makefile. Anyone know how?
CC = gcc
DEBUG = -g
CFILES = project.c
outputFile: $(CFILES) $(HFILES)
$(CC) $(DEBUG) -o outputFile $(CFILES)
Probably like that. Or add a section for flags:
$(CC) $(DEBUG) -o outputFile $(CFILES) -lposix4
CCFLAGS = -Wall -lposix4
Thank you sir, it works now.
Originally Posted by quzah
Well done Hansel; you have climbed many conceptual mountains this week. I maintain your aptitude would be wasted in sales or marketing.
Originally Posted by hansel13
We will see. My Dad is an engineer and works at Intel, so I might just follow in his footsteps there. Really depends on what school I get into for my Masters and how life plays out. Thanks for your help again on that consumer/producers problem. You'll probably see me post here a bit more this fall.
Originally Posted by jeffcobb