CC = gcc
CFLAGS = -g -Wall -I . -fverbose-asm -Wa,-a,-ahlsd=$*.asm
FFORCE = -fforce-mem

.SUFFIXES: .c .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
# use the FFORCE flag in order to see the race condition in badcnt.c
.c.exe:
	$(CC) $(CFLAGS) -o $*.exe $<
#	$(CC) $(CFLAGS) $(FFORCE) -o $*.exe $<

clean:
	rm -v *.exe
	rm -v *.asm
