# # # HOME_DIR=c:\usr\c # # # CFILE=$(wildcard *.c) BASE=$(CFILE:.c=) # # # EXE=${BASE}.exe OBJ=${BASE}.o SRC=${BASE}.c # # # FGL=${HOME_DIR}\freeglut CFLAGS=-D_WINDOWS_ -I${HOME_DIR}\include -I${FGL}\include LFLAGS=-L${FGL}\lib # # # DLL=freeglut.dll # # # LIBS=-lglui -lopengl32 -lglu32 -lglaux DLIBS=-lfreeglut ${LIBS} SLIBS=-lfreeglut_static ${LIBS} -lgdi32 -lwinmm -mwindows # # # all : env # # # env : ${EXE} ${DLL} # # # ${EXE} : ${OBJ} ${CC} -o $@ ${OBJ} ${LFLAGS} ${DLIBS} ${DLIBS} ${DLL} : ${FGL}\bin\${DLL} copy ${FGL}\bin\${DLL} ${DLL} # # # clean : del *.o *.exe ${DLL} test : env .\${EXE} # # # static : s_${EXE} s_${EXE} : s_${OBJ} ${CC} -o s_$@ s_${OBJ} -static ${LFLAGS} ${SLIBS} ${SLIBS} s_${OBJ} : ${SRC} ${CC} ${CFLAGS} -DUSE_OPENGL32 -DFREEGLUT_STATIC -c -o s_${OBJ} ${SRC} # # #