SRCDIR =. !ifdef DEBUG OUTDIR =Debug CFLAGS =-Od -Zi -GZ -MDd -D_DEBUG LDFLAGS=-debug:full -debugtype:cv !else OUTDIR =Release CFLAGS =-O2 -Op -Gs -MD -DNDEBUG LDFLAGS=-release -opt:ref -opt:icf,3 !endif TMPDIR =$(OUTDIR)\Objects OBJS = \ $(TMPDIR)\jim.obj CC =cl -nologo LD =link -nologo CFLAGS =$(CFLAGS) -W3 -GX -Fd$(TARGET:.dll=.pdb) -YX -Fp$(TMPDIR)^\ INC =-I../metakit/include -I/opt/include DEFS =-DWIN32 LIBS = all: jim jim: setup $(OUTDIR)\jim.exe $(OUTDIR)\jim.exe: $(OBJS) $(LD) $(LDFLAGS) -out:$@ $** $(LIBS) #------------------------------------------------------------------------- setup: @if not exist $(OUTDIR) mkdir $(OUTDIR) @if not exist $(TMPDIR) mkdir $(TMPDIR) test: testapp @if exist ztest.mk del ztest.mk >NUL @$(OUTDIR)\testapp.exe kviewer ztest.mk clean: @if exist $(TMPDIR) rmdir /q /s $(TMPDIR) >NUL realclean: clean @if exist $(OUTDIR) rmdir /q /s $(OUTDIR) >NUL #------------------------------------------------------------------------- .SUFFIXES:.c .cpp {$(SRCDIR)}.c{$(TMPDIR)}.obj:: $(CC) $(CFLAGS) $(DEFS) $(INC) -Fo$(TMPDIR)^\ -c @<< $< << {$(SRCDIR)}.cpp{$(TMPDIR)}.obj:: $(CC) $(CFLAGS) $(DEFS) $(INC) -Fo$(TMPDIR)^\ -c @<< $< << #-------------------------------------------------------------------------