Here is my Makefile:
# Makefile
CC=gcc
CFLAGS=-ansi -Wall
prog1: prog1.o
prog2: prog2.o
clean:
rm -f prog1.o prog2.o
Which works and creates a ‘prog1’ executable from prog1.c, but it does not build prog2 at all. How would I make it do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create an
alltarget and put it before bothprog1andprog2: