1 | # Build TAP-Win32 driver.
|
---|
2 | # Build Command: build -cef
|
---|
3 |
|
---|
4 | MAJORCOMP=ntos
|
---|
5 | MINORCOMP=ndis
|
---|
6 |
|
---|
7 | TARGETNAME=tap0801
|
---|
8 | TARGETTYPE=DRIVER
|
---|
9 | TARGETPATH=.
|
---|
10 | TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib $(DDK_LIB_PATH)\ntstrsafe.lib
|
---|
11 | INCLUDES=$(DDK_INCLUDE_PATH)
|
---|
12 |
|
---|
13 | # The TAP version numbers here must be >=
|
---|
14 | # TAP_WIN32_MIN_x values defined in
|
---|
15 | # config-win32.h
|
---|
16 | C_DEFINES=
|
---|
17 | C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MAJOR_VERSION=8
|
---|
18 | C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MINOR_VERSION=1
|
---|
19 |
|
---|
20 | # Use 00:FF:XX:XX:XX:XX format MAC addresses where
|
---|
21 | # the Xs are random (like Linux tap driver).
|
---|
22 | #
|
---|
23 | # Don't allow TAP device to be opened by more than one process
|
---|
24 | # at a time.
|
---|
25 | C_DEFINES=$(C_DEFINES)
|
---|
26 |
|
---|
27 | # Produce the same symbolic information for both free & checked builds.
|
---|
28 | # This will allow us to perform full source-level debugging on both
|
---|
29 | # builds without affecting the free build's performance.
|
---|
30 | !IF "$(DDKBUILDENV)" != "chk"
|
---|
31 | NTDEBUGTYPE=both
|
---|
32 | USE_PDB=1
|
---|
33 | !ELSE
|
---|
34 | NTDEBUGTYPE=both
|
---|
35 | USE_PDB=1
|
---|
36 | !ENDIF
|
---|
37 |
|
---|
38 | # Set compiler optimizations:
|
---|
39 | # /Ox - Full optimization enabled
|
---|
40 | # /Os - favor speed over size when optimizing
|
---|
41 | # /Od - Disable all optimizations
|
---|
42 | # /Oi - Enable optimization for intrinsic functions
|
---|
43 | # /Fc - Generate mixed assembler/source code files
|
---|
44 | #
|
---|
45 | # For both checked and free builds, make sure that any intrinsic
|
---|
46 | # functions are compiled correctly. To do this, ensure that /Oi
|
---|
47 | # is selected for both free and checked builds. There is a bug in
|
---|
48 | # VC++ 6.0 (at least through SP4) where, if you specify any
|
---|
49 | # intrinsic functions in your code with "#pragma intrinsic" but
|
---|
50 | # you don't have the /Oi optimization enabled, neither a call
|
---|
51 | # to the function, nor the intrinsic inline version of the function
|
---|
52 | # will end up in your object code. This bug only applies to free
|
---|
53 | # builds, but just to be safe we'll make sure that the flag is
|
---|
54 | # enabled for all builds.
|
---|
55 |
|
---|
56 | !IF "$(DDKBUILDENV)" != "chk"
|
---|
57 | MSC_OPTIMIZATION=/Ox /Oi /Fc
|
---|
58 | !ELSE
|
---|
59 | MSC_OPTIMIZATION=/Od /Oi /Fc
|
---|
60 | !ENDIF
|
---|
61 |
|
---|
62 | # Generate a linker map file just in case we need one for debugging
|
---|
63 | LINKER_FLAGS=$(LINKER_FLAGS) /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /MAPINFO:FIXUPS
|
---|
64 |
|
---|
65 | # Generate a browser information file for use in IDE development
|
---|
66 | BROWSER_INFO=1
|
---|
67 | BROWSERFILE=$(TARGETNAME).BSC -n
|
---|
68 |
|
---|
69 | # Abort compilation on warnings.
|
---|
70 | MSC_WARNING_LEVEL=/W3 /WX
|
---|
71 |
|
---|
72 | SOURCES=tapdrvr.c resource.rc
|
---|