# Makefile for the "sorter" program that uses the "bag" module. # # David Kotz - April 2017, 2019, 2021 # CS 50, Fall 2022 L = ../libcs50 CC = gcc CFLAGS = -Wall -pedantic -std=c11 -ggdb -I$L OBJS = sorter9.o LIBS = -lm LLIBS = $L/libcs50.a .PHONY: all clean all: sorter # executable depends on object files sorter: $(OBJS) $(LLIBS) $(CC) $(CFLAGS) $(OBJS) $(LLIBS) $(LIBS) -o sorter # object files depend on include files sorter.o: $L/bag.h $L/file.h clean: rm -f sorter rm -f *~ *.o rm -rf *.dSYM