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
|
--
-- ow.lua
-- Provides Open Watcom-specific configuration strings.
-- Copyright (c) 2008 Jason Perkins and the Premake project
--
premake.ow = { }
premake.ow.namestyle = "windows"
--
-- Set default tools
--
premake.ow.cc = "WCL386"
premake.ow.cxx = "WCL386"
premake.ow.ar = "ar"
--
-- Translation of Premake flags into OpenWatcom flags
--
local cflags =
{
ExtraWarnings = "-wx",
FatalWarning = "-we",
FloatFast = "-omn",
FloatStrict = "-op",
Optimize = "-ox",
OptimizeSize = "-os",
OptimizeSpeed = "-ot",
Symbols = "-d2",
}
local cxxflags =
{
NoExceptions = "-xd",
NoRTTI = "-xr",
}
--
-- No specific platform support yet
--
premake.ow.platforms =
{
Native = {
flags = ""
},
}
--
-- 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
|