NLM add NLM_GRANTED procedure to the rpc file
[deb_libnfs.git] / win32 / win32build.bat
CommitLineData
7f799388
M
1rem build script for win32
2rem set the
3rem
4
5rem EDIT THESE
6set ONCRPC_BASE_DIR=C:\MinGW\msys\1.0\home\Administrator\src\oncrpc-win32\
7set LIBNFS_BASE_DIR=..
8rem END EDIT
9
10set RPCINCLUDE="%ONCRPC_BASE_DIR%\win32\include"
11set RPCDLL="%ONCRPC_BASE_DIR%\win32\bin\oncrpc.dll"
12set RPCLIB="%ONCRPC_BASE_DIR%\win32\bin\oncrpc.lib"
13set RPCGEN="%ONCRPC_BASE_DIR%\win32\bin\rpcgen.exe"
14
15
16cd %LIBNFS_BASE_DIR%
17
18rem generate NFS from .x
19rem
20copy nfs\nfs.x nfs\libnfs-raw-nfs.x
21%RPCGEN% -h nfs\libnfs-raw-nfs.x > nfs\libnfs-raw-nfs.h
22%RPCGEN% -c nfs\libnfs-raw-nfs.x > nfs\libnfs-raw-nfs.c
23cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd nfs\libnfs-raw-nfs.c -Fonfs\libnfs-raw-nfs.obj
24cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd nfs\nfs.c -Fonfs\nfs.obj
25cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd nfs\nfsacl.c -Fonfs\nfsacl.obj
26
27
28
29rem
30rem generate RQUOTA from .x
31rem
32copy rquota\rquota.x rquota\libnfs-raw-rquota.x
33%RPCGEN% -h rquota\libnfs-raw-rquota.x > rquota\libnfs-raw-rquota.h
34%RPCGEN% -c rquota\libnfs-raw-rquota.x > rquota\libnfs-raw-rquota.c
35cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd rquota\libnfs-raw-rquota.c -Forquota\libnfs-raw-rquota.obj
36cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd rquota\rquota.c -Forquota\rquota.obj
37
38
39
40rem
41rem generate PORTMAP from .x
42rem
43copy portmap\portmap.x portmap\libnfs-raw-portmap.x
44%RPCGEN% -h portmap\libnfs-raw-portmap.x > portmap\libnfs-raw-portmap.h
45%RPCGEN% -c portmap\libnfs-raw-portmap.x > portmap\libnfs-raw-portmap.c
46cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd portmap\libnfs-raw-portmap.c -Foportmap\libnfs-raw-portmap.obj
47cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd portmap\portmap.c -Foportmap\portmap.obj
48
49
50rem
51rem generate MOUNT from .x
52rem
53copy mount\mount.x mount\libnfs-raw-mount.x
54%RPCGEN% -h mount\libnfs-raw-mount.x > mount\libnfs-raw-mount.h
55%RPCGEN% -c mount\libnfs-raw-mount.x > mount\libnfs-raw-mount.c
56cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd mount\libnfs-raw-mount.c -Fomount\libnfs-raw-mount.obj
57cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd mount\mount.c -Fomount\mount.obj
58
59
60
61rem
62rem generate core part of library
63rem
64cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd lib\init.c -Folib\init.obj
65cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\pdu.c -Folib\pdu.obj
66cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\socket.c -Folib\socket.obj
67cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% /Imount /Infs -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\libnfs.c -Folib\libnfs.obj
68cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% /Imount /Infs -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\libnfs-sync.c -Folib\libnfs-sync.obj
69
70rem
71rem generate win32 compat layer
72rem
73cl /I. -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" win32\win32_compat.c -Fowin32\win32_compat.obj
74
75
76
77rem
78rem create a linklibrary/dll
79rem
80lib /out:lib\libnfs.lib /def:lib\libnfs-win32.def nfs\nfs.obj nfs\nfsacl.obj nfs\libnfs-raw-nfs.obj rquota\rquota.obj rquota\libnfs-raw-rquota.obj mount\mount.obj mount\libnfs-raw-mount.obj portmap\portmap.obj portmap\libnfs-raw-portmap.obj lib\init.obj lib\pdu.obj lib\socket.obj lib\libnfs.obj lib\libnfs-sync.obj win32\win32_compat.obj
81
82link /DLL /out:lib\libnfs.dll /DEBUG /DEBUGTYPE:cv lib\libnfs.exp nfs\nfs.obj nfs\nfsacl.obj nfs\libnfs-raw-nfs.obj rquota\rquota.obj rquota\libnfs-raw-rquota.obj mount\mount.obj mount\libnfs-raw-mount.obj portmap\portmap.obj portmap\libnfs-raw-portmap.obj lib\init.obj lib\pdu.obj lib\socket.obj lib\libnfs.obj lib\libnfs-sync.obj win32\win32_compat.obj %RPCLIB% ws2_32.lib
83
84
85
86rem
87rem build a test application
88rem
89cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% /Imount /Infs -Zi -Od -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" examples\nfsclient-sync.c lib\libnfs.lib %RPCLIB% WS2_32.lib kernel32.lib mswsock.lib advapi32.lib wsock32.lib advapi32.lib
90
91
92
93
94
95
96
97