# Makefile template for CS 270 # List of files C_SRCS = R5.c R5Test.c C_OBJS = R5.o R5Test.o C_HEADERS = R5.h # Executable name EXE = R5 # Compiler and loader commands and flags GCC = gcc GCC_FLAGS = -g -std=c11 -D_GNU_SOURCE -Wall -c LD_FLAGS = -g -std=c11 -D_GNU_SOURCE -Wall # Compile C source to object files .c.o: $(GCC) $(GCC_FLAGS) $< # Target is the executable default: $(C_OBJS) $(GCC) $(LD_FLAGS) $(C_OBJS) -o $(EXE) # Recompile C objects if headers change ${C_OBJS}: ${C_HEADERS} # Clean up the directory clean: rm -f *.o *~ $(EXE) # Package files package: R5.c R5.h tar -cvf R5.tar R5.c R5.h