Commit | Line | Data |
---|---|---|
7f799388 M |
1 | rem build script for win32 |
2 | rem set the | |
3 | rem | |
4 | ||
5 | rem EDIT THESE | |
6 | set ONCRPC_BASE_DIR=C:\MinGW\msys\1.0\home\Administrator\src\oncrpc-win32\ | |
7 | set LIBNFS_BASE_DIR=.. | |
8 | rem END EDIT | |
9 | ||
10 | set RPCINCLUDE="%ONCRPC_BASE_DIR%\win32\include" | |
11 | set RPCDLL="%ONCRPC_BASE_DIR%\win32\bin\oncrpc.dll" | |
12 | set RPCLIB="%ONCRPC_BASE_DIR%\win32\bin\oncrpc.lib" | |
13 | set RPCGEN="%ONCRPC_BASE_DIR%\win32\bin\rpcgen.exe" | |
14 | ||
15 | ||
16 | cd %LIBNFS_BASE_DIR% | |
17 | ||
18 | rem generate NFS from .x | |
19 | rem | |
20 | copy 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 | |
23 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd nfs\libnfs-raw-nfs.c -Fonfs\libnfs-raw-nfs.obj | |
24 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd nfs\nfs.c -Fonfs\nfs.obj | |
25 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd nfs\nfsacl.c -Fonfs\nfsacl.obj | |
26 | ||
27 | ||
28 | ||
29 | rem | |
30 | rem generate RQUOTA from .x | |
31 | rem | |
32 | copy 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 | |
35 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd rquota\libnfs-raw-rquota.c -Forquota\libnfs-raw-rquota.obj | |
36 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd rquota\rquota.c -Forquota\rquota.obj | |
37 | ||
38 | ||
39 | ||
40 | rem | |
41 | rem generate PORTMAP from .x | |
42 | rem | |
43 | copy 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 | |
46 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd portmap\libnfs-raw-portmap.c -Foportmap\libnfs-raw-portmap.obj | |
47 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd portmap\portmap.c -Foportmap\portmap.obj | |
48 | ||
49 | ||
50 | rem | |
51 | rem generate MOUNT from .x | |
52 | rem | |
53 | copy 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 | |
56 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd mount\libnfs-raw-mount.c -Fomount\libnfs-raw-mount.obj | |
57 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd mount\mount.c -Fomount\mount.obj | |
58 | ||
59 | ||
60 | ||
61 | rem | |
62 | rem generate core part of library | |
63 | rem | |
64 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd lib\init.c -Folib\init.obj | |
65 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\pdu.c -Folib\pdu.obj | |
66 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\socket.c -Folib\socket.obj | |
67 | cl /I. /Iinclude /Iwin32 /I%RPCINCLUDE% /Imount /Infs -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" lib\libnfs.c -Folib\libnfs.obj | |
68 | cl /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 | ||
70 | rem | |
71 | rem generate win32 compat layer | |
72 | rem | |
73 | cl /I. -Zi -Od -c -DWIN32 -D_WIN32_WINNT=0x0501 -MDd -D_U_="" win32\win32_compat.c -Fowin32\win32_compat.obj | |
74 | ||
75 | ||
76 | ||
77 | rem | |
78 | rem create a linklibrary/dll | |
79 | rem | |
80 | lib /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 | ||
82 | link /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 | ||
86 | rem | |
87 | rem build a test application | |
88 | rem | |
89 | cl /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 |