Platform SDK: Tools |
WIN32.MAK includes the following macros to simplify compilation of C/C++ source files:
This macro is used to invoke the compiler. It expands to the following:
cl
This macro is used for common compiler flags. It is platform dependent. On x86 machines, it includes the following flags:
-c -W3 -D_X86=1
This macro is used for debugging, profiling, and tuning compiler flags. When specifying debug, but no profiling or tuning, it expands to the following flags:
-Z7 -Od
Use one of the following three macros if you are using the C run-time library:
This macro is used for single-threaded applications. It expands to the following flags:
-DWIN32 -DNULL=0
This macro is used for multithreaded applications. It expands to the following flags:
-DWIN32 -DNULL=0 -D_MT
This macro is used for applications that use the CRT in a DLL. It expands to the following flags:
-DWIN32 -DNULL=0 -D_MT -D_DLL
The following example shows how you can compile your source files using these macros:
generic.obj: generic.c $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
WIN32.MAK includes the following macros to simplify compilation of resource-definition files:
This macro is used to invoke the resource compiler. It expands to the following:
rc
This macro is used for common flags. It expands to the following flags:
-r
This macro is used for other flags. It expands to the following flags:
-DWIN32 -DWINVER=0x0400
The following example shows how you can compile your resource-definition file using these macros:
generic.res: generic.rc generic.h generic.dlg $(rc) $(rcvars) $(rcflags) $*.rc