# Makefile for the "bagsimple" program that uses the "bag" module. # # CS 50 Fall 2022 CC = gcc CFLAGS = -Wall -pedantic -std=c11 -ggdb PROG = bagsimple OBJS = bagsimple.o bag.o readlinep.o LIBS = -lm #can be blank (e.g., LIBS = ) .PHONY: all clean all: $(PROG) # executable depends on object files $(PROG): $(OBJS) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROG) # object files depend on header files bagsimple.o: bag.h readlinep.h bag.o: bag.h readlinep.o: readlinep.h clean: rm -f $(PROG) rm -f *~ *.o rm -rf *.dSYM