diff options
Diffstat (limited to 'makefiles/nmake/compiler.mk')
-rw-r--r-- | makefiles/nmake/compiler.mk | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/makefiles/nmake/compiler.mk b/makefiles/nmake/compiler.mk index 51c8596..d6988d0 100644 --- a/makefiles/nmake/compiler.mk +++ b/makefiles/nmake/compiler.mk @@ -15,9 +15,16 @@ # /nologo: disable MS disclaimer # /MT: create a multi-thread binary # /EHsc: enable C++ exception handling +# /Ox: optimize what you can +# /Zi: enable debug information +# /MTD: create multi-threaded debug binary +# /we<n>: show warnings (level 1 to 4) +# /Wall: enable all warnings -# compilation flags and compilers +# compilation flags and compilers (release) COMMON_COMPILE_FLAGS = /MT /nologo /c $(INCLUDE_DIRS) +# compilation flags and compilers (debug) +#COMMON_COMPILE_FLAGS = /MDd /ZI /nologo /c $(INCLUDE_DIRS) /RTC1 COMPILE_FLAGS = $(COMMON_COMPILE_FLAGS) @@ -30,7 +37,12 @@ CCPP = cl.exe MC = "$(PLATFORM_SDK_DIR)\Bin\mc.exe" RC = "$(PLATFORM_SDK_DIR)\Bin\rc.exe" +# linking flags (release) LDFLAGS = /nologo $(INCLUDE_LDFLAGS) + +# linking flags (debug) +#LDFLAGS = /nologo /debug $(INCLUDE_LDFLAGS) + LIBS = $(INCLUDE_LIBS) LINK = link.exe CCPP_LINK = link.exe @@ -41,7 +53,13 @@ CCPP_LINK = link.exe $(CC) $(CFLAGS) /Fo$@ $< .cpp.obj: - $(CCPP) $(CCPPFLAGS) $< + $(CCPP) $(CCPPFLAGS) /Fo$@ $< + +.c.dllobj: + $(CC) $(CFLAGS) /D "BUILD_SHARED" /Fo$@ $< + +.cpp.dllobj: + $(CCPP) $(CCPPFLAGS) /D "BUILD_SHARED" /Fo$@ $< .obj.exe: $(CCPP_LINK) $(LDFLAGS) $(LIBS) /out:$@ $< $(OBJS) |