1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.cpptasks.openwatcom;
21
22 import java.io.File;
23
24 import org.apache.tools.ant.types.Environment;
25
26 import com.github.maven_nar.cpptasks.compiler.LinkType;
27 import com.github.maven_nar.cpptasks.compiler.Linker;
28 import com.github.maven_nar.cpptasks.parser.CParser;
29 import com.github.maven_nar.cpptasks.parser.Parser;
30
31
32
33
34
35
36 public final class OpenWatcomCCompiler extends OpenWatcomCompiler {
37
38
39
40 private static final OpenWatcomCCompiler INSTANCE = new OpenWatcomCCompiler("wcl386", false, null);
41
42
43
44
45
46
47 public static OpenWatcomCCompiler getInstance() {
48 return INSTANCE;
49 }
50
51
52
53
54
55
56
57
58
59
60
61 private OpenWatcomCCompiler(final String command, final boolean newEnvironment, final Environment env) {
62 super(command, "/?", new String[] {
63 ".c", ".cc", ".cpp", ".cxx", ".c++"
64 }, new String[] {
65 ".h", ".hpp", ".inl"
66 }, newEnvironment, env);
67 }
68
69
70
71
72
73
74
75
76 @Override
77 public Parser createParser(final File source) {
78 return new CParser();
79 }
80
81
82
83
84
85
86
87
88 @Override
89 public Linker getLinker(final LinkType type) {
90 return OpenWatcomCLinker.getInstance().getLinker(type);
91 }
92 }