Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ow.lua « tools « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4f1e8f5b79f0edd5b9019b7e5099e0cea0dd71e8 (plain)
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
--
-- ow.lua
-- Provides Open Watcom-specific configuration strings.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--

	premake.ow = { }
	premake.ow.targetstyle = "windows"
	
	
--
-- Translation of Premake flags into OpenWatcom flags
--

	local cflags =
	{
		ExtraWarnings  = "-wx",
		FatalWarning   = "-we",
		Optimize       = "-ox",
		OptimizeSize   = "-os",
		OptimizeSpeed  = "-ot",
		Symbols        = "-d2",
	}

	local cxxflags =
	{
		NoExceptions   = "-xd",
		NoRTTI         = "-xr",
	}
	


--
-- No specific platform support yet
--

	premake.ow.platforms = 
	{
		Native = { suffix="", cflags="" },
	}


	
--
-- Returns a list of compiler flags, based on the supplied configuration.
--

	function premake.ow.getcppflags(cfg)
		return ""
	end

	function premake.ow.getcflags(cfg)
		local result = table.translate(cfg.flags, cflags)		
		if (cfg.flags.Symbols) then
			table.insert(result, "-hw")   -- Watcom debug format for Watcom debugger
		end
		return result		
	end
	
	function premake.ow.getcxxflags(cfg)
		local result = table.translate(cfg.flags, cxxflags)
		return result
	end
	


--
-- Returns a list of linker flags, based on the supplied configuration.
--

	function premake.ow.getldflags(cfg)
		local result = { }
		
		if (cfg.flags.Symbols) then
			table.insert(result, "op symf")
		end
				
		return result
	end
		
	
--
-- Returns a list of linker flags for library search directories and 
-- library names.
--

	function premake.ow.getlinkflags(cfg)
		local result = { }
		return result
	end
	
	

--
-- Decorate defines for the command line.
--

	function premake.ow.getdefines(defines)
		local result = { }
		for _,def in ipairs(defines) do
			table.insert(result, '-D' .. def)
		end
		return result
	end


	
--
-- Decorate include file search paths for the command line.
--

	function premake.ow.getincludedirs(includedirs)
		local result = { }
		for _,dir in ipairs(includedirs) do
			table.insert(result, '-I "' .. dir .. '"')
		end
		return result
	end