PROGRAM=02_dialogtest_tb.exe SRC=$(PROGRAM:.exe=.c) OBJS=$(SRC:.c=.o) resource.o .PHONY: all all: $(PROGRAM) $(PROGRAM): $(OBJS) Makefile gcc $(OBJS) -lcomctl32 -mwindows -o $@ %.o: %.c gcc -O3 -o $@ -c $< resource.o: resource.rc Makefile windres $< -o $@ .PHONY: cleanall clean cleanall: clean rm -f $(PROGRAM) .PHONY: clean clean: rm -f $(OBJS)