diff options
Diffstat (limited to 'Makefile.vc')
-rw-r--r-- | Makefile.vc | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Makefile.vc b/Makefile.vc new file mode 100644 index 0000000..d2405a3 --- /dev/null +++ b/Makefile.vc @@ -0,0 +1,64 @@ +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 @<< +$< +<< + +#------------------------------------------------------------------------- |