File: pg_catcheck.proj

package info (click to toggle)
pg-catcheck 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 260 kB
  • sloc: ansic: 2,806; makefile: 40; sh: 4
file content (93 lines) | stat: -rw-r--r-- 3,493 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="pg_catcheck">

    <Import Project="settings.projinc" />

    <!-- Setup for Debug or Release -->
    <Choose>
        <When Condition="'$(DEBUG)'=='1'">
            <PropertyGroup>
                <XTRA_CFLAGS>/Od /MDd /Zi /D "DEBUG=1" /D "_DEBUG"</XTRA_CFLAGS>
				<BUILD_SUBDIR>Debug</BUILD_SUBDIR>
            </PropertyGroup>
        </When>
        <Otherwise>
            <PropertyGroup>
                <XTRA_CFLAGS>/Ox /MD /GF </XTRA_CFLAGS>
				<BUILD_SUBDIR>Release</BUILD_SUBDIR>
            </PropertyGroup>
        </Otherwise>
    </Choose>

    <!-- Architecture-specific compiler flags -->
    <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>
                <XTRA_ARCH_LDFLAGS></XTRA_ARCH_LDFLAGS>
            </PropertyGroup>
        </Otherwise>
    </Choose>

    <PropertyGroup>
        <!-- Compiler flags -->
        <CFLAGS>/nologo /wd4273 /TC /LD $(XTRA_CFLAGS) /GS /fp:precise /Zc:wchar_t /D "WIN32" /D "__WIN32__" $(XTRA_ARCH_CFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_MBCS"</CFLAGS>

        <!-- Linker flags -->
        <LDFLAGS>$(XTRA_ARCH_LDFLAGS) /DEBUG /PDB:"pg_catcheck.pdb" /defaultlib:user32 /defaultlib:netapi32 /defaultlib:advapi32 /defaultlib:shell32 /defaultlib:ws2_32 /defaultlib:Secur32.lib /defaultlib:$(PGPATH)\$(BUILD_SUBDIR)\libpq\libpq.lib /defaultlib:$(PGPATH)\$(BUILD_SUBDIR)\libpgport\libpgport.lib /defaultlib:$(PGPATH)\$(BUILD_SUBDIR)\libpgcommon\libpgcommon.lib"</LDFLAGS>

		<!-- Executable name -->
		<EXE_NAME>pg_catcheck.exe</EXE_NAME>
    </PropertyGroup>

    <ItemGroup>
        <IncludeDirs Include="/I$(PGPATH)\src\include" />
        <IncludeDirs Include="/I$(PGPATH)\src\include\port\win32" />
        <IncludeDirs Include="/I$(PGPATH)\src\include\port\win32_msvc" />
        <IncludeDirs Include="/I$(PGPATH)\src\interfaces\libpq" />
    </ItemGroup>

    <!-- source files -->
    <ItemGroup>
		<SrcFiles Include="check_attribute.c" />
		<SrcFiles Include="check_class.c" />
		<SrcFiles Include="check_depend.c" />
		<SrcFiles Include="check_oids.c" />
		<SrcFiles Include="definitions.c" />
		<SrcFiles Include="log.c" />
		<SrcFiles Include="pg_catcheck.c" />
		<SrcFiles Include="pgrhash.c" />
		<SrcFiles Include="select_from_relations.c" />
	</ItemGroup>

    <!-- files to delete -->
    <ItemGroup>
		<File2Delete Include="$(EXE_NAME)" />
		<File2Delete Include="@(SrcFiles -> '%(Filename).obj')" />
		<File2Delete Include="*.pdb" />
		<File2Delete Include="pg_catcheck.ilk" />
	</ItemGroup>

    <Target Name="pg_catcheck"
            Inputs="@(SrcFiles)"
            Outputs="pg_catcheck.exe">
        <Message Text="Building pg_catcheck" />

	<!-- Compile the source files. -->
        <Exec Command="cl $(CFLAGS) /c @(IncludeDirs, ' ') @(SrcFiles, ' ')" />

	<!-- Link all the object files to pg_catcheck.exe -->
        <Exec Command="link /OUT:$(EXE_NAME) @(SrcFiles -> '%(Filename).obj', ' ') $(LDFLAGS) " />
    </Target>

	<!-- Remove generated files -->
    <Target Name="clean">
        <Delete Files="@(File2Delete)" />
    </Target>
</Project>