PROGRAM = 01_glbitmap.exe SRC = $(PROGRAM:%.exe=%.c) ifeq ($(MSYSTEM),MINGW64) # -------------------- # MSYS2 MINGW64 $(PROGRAM): $(SRC) image_32x32.h image_lena.h Makefile gcc $< -o $@ -lglu32 -D FREEGLUT_STATIC -lfreeglut -lopengl32 -lwinmm -lgdi32 -static else # -------------------- # MinGW $(PROGRAM): $(SRC) image_32x32.h image_lena.h Makefile gcc $< -o $@ -lglu32 -D FREEGLUT_STATIC -lfreeglut_static -lopengl32 -lwinmm -lgdi32 endif image_32x32.h: image_32x32.png Makefile python png2bits.py -i $< --label image_32x32 > $@ image_lena.h: image_lena.png Makefile python png2bits.py -i $< --label image_lena > $@ .PHONY: clean clean: rm -f *.exe rm -f *.o rm -f image_32x32.h rm -f image_lena.h