SRC=simple.c basic.c 
OBJ=$(SRC:.c=.o)
EXE=$(SRC:.c=.exe)

default: $(EXE)

%.exe: %.o
	$(CC) $^ -o $@

%.o: %.c
	$(CC) -c $^ -o $@

clean:
	$(RM) $(OBJ) $(EXE)

# makefile deletes intermediate files
# automatically. To preserve the *.o
# .PRECIOUS/SECONDARY or add them to default

.SECONDARY: $(OBJ)
