Visual Studio Builds: Don't Generate atk.def
[platform/upstream/atk.git] / build / testsrules_msvc.mak
1 # Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
2 # VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
3 !if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
4 MSG = ^
5 This Makefile is only for Visual Studio 2008 and later.^
6 You need to ensure that the Visual Studio Environment is properly set up^
7 before running this Makefile.
8 !error $(MSG)
9 !endif
10
11 ERRNUL  = 2>NUL
12 _HASH=^#
13
14 !if ![echo VCVERSION=_MSC_VER > vercl.x] \
15     && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
16     && ![echo PLAT=Win32 >> vercl.x] \
17     && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
18     && ![echo PLAT=x64 >> vercl.x] \
19     && ![echo $(_HASH)endif >> vercl.x] \
20     && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
21 !include vercl.i
22 !if ![echo VCVER= ^\> vercl.vc] \
23     && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
24 !include vercl.vc
25 !endif
26 !endif
27 !if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
28 !endif
29
30 !if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
31 VSVER = 9
32 !elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
33 VSVER = 10
34 !elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
35 VSVER = 11
36 !elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
37 VSVER = 12
38 !else
39 VSVER = 0
40 !endif
41
42 !if "$(VSVER)" == "0"
43 MSG = ^
44 This NMake Makefile set supports Visual Studio^
45 9 (2008) through 12 (2013).  Your Visual Studio^
46 version is not supported.
47 !error $(MSG)
48 !endif
49
50 VALID_CFGSET = FALSE
51 !if "$(CFG)" == "release" || "$(CFG)" == "debug"
52 VALID_CFGSET = TRUE
53 !endif
54
55 !if "$(CFG)" == "release"
56 CFLAGS_ADD = /MD /O2
57 !else
58 CFLAGS_ADD = /MDd /Od /Zi
59 !endif
60
61 !if "$(PLAT)" == "x64"
62 LDFLAGS_ARCH = /machine:x64
63 !else
64 LDFLAGS_ARCH = /machine:x86
65 !endif
66
67 LD = link.exe
68 LD_CFLAGS = /link
69 EXEEXT = .exe
70 GLIB_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib
71
72 ATK_API_VERSION = 1.0