# Makefile template for CS 270 # List of files SRCS = trace.c testTrace.c OBJS = trace.o testTrace.o HEADERS = trace.h EXE = testTrace DEFINES = -DDEBUG -DHALF LIB = # Compiler and loader commands and flags GCC = gcc -m32 GCC_FLAGS = -g -std=c11 -Wall -c LD_FLAGS = -g -std=c11 -Wall # Compile .c files to .o files .c.o: $(GCC) $(GCC_FLAGS) $(DEFINES) $< # Target is the executable default: $(OBJS) $(LIB) $(GCC) -o $(EXE) $(LD_FLAGS) $(OBJS) $(LIB) # Recompile C objects if headers change ${OBJS}: ${HEADERS} # Clean up the directory clean: rm -f $(OBJS) *~ $(EXE)