-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsslutils.proj
148 lines (130 loc) · 6.28 KB
/
sslutils.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="all">
<Choose>
<When Condition="'$(USE_PGXS)'=='1'">
<ItemGroup>
<ClCommand Include="/I"$(PGPATH)\include"" />
<ClCommand Include="/I"$(PGPATH)\include\server"" />
<ClCommand Include="/I"$(PGPATH)\include\server\port\win32"" />
<ClCommand Include="/I"$(PGPATH)\include\server\port\win32_msvc"" />
<ClCommand Include="/I"$(PGPATH)\include\server\port"" />
<ClCommand Include="/I$(OPENSSLPATH)\include" />
<ClCommand Include="/I$(GETTEXTPATH)\include" />
</ItemGroup>
<PropertyGroup>
<TARGETS>sslutils;sslutils-sql;install</TARGETS>
</PropertyGroup>
<!-- Setup for Debug or Release -->
<Choose>
<When Condition="'$(DEBUG)'=='1'">
<PropertyGroup>
<XTRA_CFLAGS>/Od /MDd /Zi /D "DEBUG=1" /D "_DEBUG"</XTRA_CFLAGS>
<XTRA_LDFLAGS>/DEBUG /defaultlib:"$(PGPATH)\lib\$(PGLIB_PREFIX)postgres.lib" /defaultlib:$(OPENSSLPATH)\lib\libssl.lib /defaultlib:$(OPENSSLPATH)\lib\libcrypto.lib</XTRA_LDFLAGS>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DEBUG>0</DEBUG>
<XTRA_CFLAGS>/Ox /MD /GF</XTRA_CFLAGS>
<XTRA_LDFLAGS>/defaultlib:"$(PGPATH)\lib\$(PGLIB_PREFIX)postgres.lib" /defaultlib:$(OPENSSLPATH)\lib\libssl.lib /defaultlib:$(OPENSSLPATH)\lib\libcrypto.lib</XTRA_LDFLAGS>
</PropertyGroup>
</Otherwise>
</Choose>
</When>
<Otherwise>
<ItemGroup>
<ClCommand Include="/I"$(PGPATH)\src\include"" />
<ClCommand Include="/I"$(PGPATH)\src\include\port\win32"" />
<ClCommand Include="/I"$(PGPATH)\src\include\port\win32_msvc"" />
<ClCommand Include="/I"$(PGPATH)\src\port"" />
<ClCommand Include="/I$(OPENSSLPATH)\include" />
<ClCommand Include="/I$(GETTEXTPATH)\include" />
</ItemGroup>
<PropertyGroup>
<TARGETS>sslutils;sslutils-sql;install;clean</TARGETS>
</PropertyGroup>
<!-- Setup for Debug or Release -->
<Choose>
<When Condition="'$(DEBUG)'=='1'">
<PropertyGroup>
<XTRA_CFLAGS>/Od /MDd /Zi /D "DEBUG=1" /D "_DEBUG"</XTRA_CFLAGS>
<XTRA_LDFLAGS>/DEBUG /defaultlib:"$(PGPATH)\Debug\postgres\$(PGLIB_PREFIX)postgres.lib" /defaultlib:$(OPENSSLPATH)\lib\libssl.lib /defaultlib:$(OPENSSLPATH)\lib\libcrypto.lib</XTRA_LDFLAGS>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DEBUG>0</DEBUG>
<XTRA_CFLAGS>/Ox /MD /GF</XTRA_CFLAGS>
<XTRA_LDFLAGS>/defaultlib:"$(PGPATH)\Release\postgres\$(PGLIB_PREFIX)postgres.lib" /defaultlib:$(OPENSSLPATH)\lib\libssl.lib /defaultlib:$(OPENSSLPATH)\lib\libcrypto.lib</XTRA_LDFLAGS>
</PropertyGroup>
</Otherwise>
</Choose>
</Otherwise>
</Choose>
<Choose>
<When Condition="'$(ARCH)'=='x64'">
<PropertyGroup>
<XTRA_ARCH_CFLAGS></XTRA_ARCH_CFLAGS>
<XTRA_ARCH_LDFLAGS>/MACHINE:X64</XTRA_ARCH_LDFLAGS>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<XTRA_ARCH_CFLAGS>/D _USE_32BIT_TIME_T</XTRA_ARCH_CFLAGS>
</PropertyGroup>
</Otherwise>
</Choose>
<Target Name="all" DependsOnTargets="$(TARGETS)" />
<PropertyGroup>
<!-- Compiler flags -->
<CFLAGS>/nologo /TC /LD $(XTRA_CFLAGS) /D UNSAFE_STAT_OK /D "WIN32" /D "__WIN32__" $(XTRA_ARCH_CFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_WINDLL" /D "_MBCS"</CFLAGS>
<!-- Linker flags -->
<LDFLAGS>/DLL $(XTRA_LDFLAGS) $(XTRA_ARCH_LDFLAGS) /defaultlib:user32 /defaultlib:netapi32 /defaultlib:advapi32 /defaultlib:shell32 /defaultlib:ws2_32 /defaultlib:Secur32.lib</LDFLAGS>
</PropertyGroup>
<!-- sslutils -->
<ItemGroup>
<TargetInfoSrc Include="sslutils.c" />
</ItemGroup>
<Target Name="sslutils" Inputs="@(TargetInfoSrc)" Outputs="sslutils.dll">
<Message Text="Building sslutils.dll" />
<Message Text="Building Debug version: $(DEBUG)" />
<WriteLinesToFile File="flist" Lines="@(ClCommand)" Overwrite="true" />
<WriteLinesToFile File="flist" Lines="@(TargetInfoSrc)" Overwrite="false" />
<Exec Command="cl $(CFLAGS) @flist /link /def:sslutils.def $(LDFLAGS) /OUT:sslutils.dll /IMPLIB:sslutils.lib" />
</Target>
<Target Name="sslutils-sql">
<Message Text="Creating sslutils.sql" />
<Exec Command="copy /Y sslutils.sql.in sslutils.sql"/>
<Message Text="Creating uninstall_sslutils.sql" />
<Exec Command="copy /Y uninstall_sslutils.sql.in uninstall_sslutils.sql"/>
</Target>
<Target Name="install" DependsOnTargets="sslutils;sslutils-sql" Condition="'$(INSTALL_PREFIX)' != ''">
<ItemGroup>
<ContribFiles Include="sslutils.sql;uninstall_sslutils.sql"/>
</ItemGroup>
<ItemGroup>
<ExtensionFiles Include="sslutils--1.3.sql;sslutils--1.2.sql;sslutils--1.1.sql;sslutils--unpackaged--1.0.sql;sslutils--1.0--1.1.sql;sslutils--1.1--1.2.sql;sslutils--1.2--1.3.sql;sslutils--1.0--1.3.sql;sslutils--1.1--1.3.sql;sslutils--unpackaged--1.3.sql;sslutils.control"/>
</ItemGroup>
<Message Text="Please copy the dll, sql(s) & control files "/>
<MakeDir Directories="$(INSTALL_PREFIX)\lib"/>
<MakeDir Directories="$(INSTALL_PREFIX)\share\extension"/>
<MakeDir Directories="$(INSTALL_PREFIX)\doc"/>
<Copy SourceFiles="sslutils.dll" DestinationFolder="$(INSTALL_PREFIX)\lib"/>
<Copy SourceFiles="@(ContribFiles)" DestinationFolder="$(INSTALL_PREFIX)\share"/>
<Copy SourceFiles="@(ExtensionFiles)" DestinationFolder="$(INSTALL_PREFIX)\share\extension"/>
<Copy SourceFiles="README.sslutils" DestinationFolder="$(INSTALL_PREFIX)\doc"/>
</Target>
<Target Name="clean">
<Delete Files="sslutils.sql" />
<Delete Files="uninstall_sslutils.sql" />
<Delete Files="sslutils.dll" />
<Delete Files="sslutils.exp" />
<Delete Files="sslutils.lib" />
<Delete Files="sslutils.dll.manifest" />
<Delete Files="flist" />
<Delete Files="vc90.pdb" />
<Delete Files="sslutils.obj" />
<Delete Files="sslutils.pdb" />
<Delete Files="sslutils.ilk" />
</Target>
</Project>