# Windows Angband makefile for NMAKE and MS Visual C # # Debug build: NMAKE /F Makefile.nmake # Release build: NMAKE /F Makefile.nmake RELEASE=1 default: executables # tools and config CC = cl LINK = link RC = rc # _CRT_SECURE_NO_WARNINGS is to disable deprecation warnings about strtok(), # localtime(), ctime(), _open(), fopen(), mbstowcs(), and wctomb(). CFLAGS = /DWINDOWS /D_CRT_SECURE_NO_WARNINGS /W3 /GF /GA /nologo /DALLOW_BORG LFLAGS = /nologo RCFLAGS = LIBS = Msimg32.lib Gdi32.lib User32.lib Comdlg32.lib Shell32.lib Winmm.lib \ win\lib\libpng.lib win\lib\zlib.lib !if defined(RELEASE) CFLAGS = $(CFLAGS) /O2 /Os /Gs /I. /I.. /Iwin\include !else CFLAGS = $(CFLAGS) /Od /Zi /I. /I.. /Iwin\include LFLAGS = $(LFLAGS) /debug !endif # files include Makefile.src EXE = $(NAME).exe OBJS = $(ANGFILES) $(ZFILES) $(WINMAINFILES) RES = win\$(PROGNAME).res # rules .c.o: $(CC) /c /Fo$@ $(CFLAGS) $? # Handle as a special case to avoid warnings about the .o files it depends upon. buildid.o: $(CC) /c /Fo$@ $(CFLAGS) $*.c $(RES) : win\$(PROGNAME).rc $(RC) $(RCFLAGS) $** $(EXE) : $(OBJS) $(LINK) /out:$@ $(LFLAGS) $** $(LIBS) executables: ..\$(EXE) ..\$(EXE) : $(EXE) copy $** $@ clean: del $(OBJS) $(RES) $(EXE)