# Edit this stuff PROGRAM := halium SRC := main.c halium.c tree234.c LIBS := # Makefile begins here SHELL := /bin/sh SUFFIXES := OBJ := $(patsubst %.c,%.o,$(filter %.c,$(SRC))) DEP := $(patsubst %.c,%.d,$(filter %.c,$(SRC))) all: $(PROGRAM) $(PROGRAM): $(OBJ) $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $(OBJ) # Include dependencies ifneq ($(MAKECMDGOALS),clean) -include $(DEP) endif # Generate object and dependency files from source %.d %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -MMD -c -o $(patsubst %.d,%.o,$@) $< # Remove generated files clean: -rm -f core $(PROGRAM) $(OBJ) $(DEP) # Tell make about special (non-file) targets .PHONY: all clean