#
# Use this makefile with the command
#   C:\cs59000-05\mingw32\bin\mingw32-make.exe
#
CC = C:\cs59000-05\MinGW32\bin\gcc.exe
CFLAGS = -Wall -g -o $*.exe $<

# This special target is needed because exe is not a "known suffix" in Unix.
.SUFFIXES: .exe

# See Section 5.4.3 of "GNU Make Manual"
# 08 July 2002, GNU make Version 3.80.
all: $(patsubst %.c,%.exe,$(wildcard *.c))

# Use a simple suffix rule to compile any c file.
# See Section 11.7 of "GNU Make Manual"
# 08 July 2002, GNU make Version 3.80.
.c.exe:
	$(CC) $(CFLAGS)

# delete only the files that we made
clean:
	del $(patsubst %.c,%.obj,$(wildcard *.c))
	del $(patsubst %.c,%.pdb,$(wildcard *.c))
	del $(patsubst %.c,%.exe,$(wildcard *.c))
