1# Makefile for Win32 using MSVC: 2# nmake /f Makefile.vc 3# 4# If you specifically want to build for x86: 5# nmake /f Makefile.vc CPU=x86 6 7# change INCLUDES so it points to SDL2 headers directory: 8INCLUDES = -Iinclude 9 10CPPFLAGS = -DNDEBUG -DDLL_EXPORT 11CPPFLAGS = $(CPPFLAGS) -DSDL_DISABLE_IMMINTRIN_H 12 13CC = cl 14LD = link 15RC = rc 16 17CFLAGS = /nologo /O2 /MD /W3 /GS- 18LDFLAGS = /nologo /DLL /NODEFAULTLIB /RELEASE 19LDLIBS = kernel32.lib user32.lib 20 21!if "$(CPU)" == "x86" 22CFLAGS = $(CFLAGS) /arch:SSE 23!endif 24 25DLLNAME = SDL.dll 26IMPNAME = SDL.lib 27 28OBJ = SDL12_compat.obj version.res 29 30all: $(DLLNAME) 31 32$(DLLNAME): $(OBJ) 33 $(LD) /OUT:$@ $(LDFLAGS) $(OBJ) $(LDLIBS) 34 35.c.obj: 36 $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) /Fo$@ -c $< 37.rc.res: 38 $(RC) /r /Fo$@ $< 39 40distclean: clean 41clean: 42 -del *.obj *.res *.exp *.manifest $(DLLNAME) $(IMPNAME) 43