!ifndef BIN
BIN = $(ROOT)\bin
!endif
!ifndef BUILD
BUILD = .
!endif
!ifndef LIBRARY
LIBRARY = $(ROOT)\lib
!endif
!ifndef INCLUDE
INCLUDE = -I$(ROOT)\include
!else
INCLUDE = $(INCLUDE) -I$(ROOT)\include
!endif
!ifndef UPDATE_VERSION
UPDATE_VERSION = $(BIN)\update_version.exe
!endif
LIB = $(LIB);$(LIBRARY)\$(O)
!ifndef S
S=.
!endif
!ifndef O
O=.
!endif
# set NODEBUG _before_ win32.mak
!ifndef DEBUG
NODEBUG=yes
!endif
!include <win32.mak>
OUTDIR=$(O)
# any modifications to the flags should go _after_ win32.mak
!ifdef UNICODE
cflags = $(cflags) -DUNICODE -D_UNICODE
!endif
cflags = $(cflags) -D_CRT_NON_CONFORMING_SWPRINTFS -D_CRT_SECURE_NO_DEPRECATE
all: init $(TARGET)
init:
@if not exist $(O) mkdir $(O)
clean: _make-clean_
del $(TARGET) $(OBJ)
$(CLEANUP)
debug:
$(MAKE) DEBUG=YES UNICODE=YES
unicode:
$(MAKE) UNICODE=YES
release:
$(MAKE)
{$(S)}.cpp{$(O)}.obj:
$(cc) $(cflags) $(cvarsmt) $(cdebug) /WX /Fo$@ $<
{$(S)}.c{$(O)}.obj:
$(cc) $(cflags) $(cvarsmt) $(cdebug) /WX /Fo$@ $<
{$(S)}.rc{$(O)}.res:
$(rc) $(rcvars) $(rcflags) /fo $@ $<