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.FortranParser;
29 import com.github.maven_nar.cpptasks.parser.Parser;
30
31
32
33
34
35
36 public final class OpenWatcomFortranCompiler extends OpenWatcomCompiler {
37
38
39
40 private static final OpenWatcomFortranCompiler[] INSTANCE = new OpenWatcomFortranCompiler[] {
41 new OpenWatcomFortranCompiler("wfl386", false, null)
42 };
43
44
45
46
47
48
49 public static OpenWatcomFortranCompiler getInstance() {
50 return INSTANCE[0];
51 }
52
53
54
55
56
57
58
59
60
61
62
63 private OpenWatcomFortranCompiler(final String command, final boolean newEnvironment, final Environment env) {
64 super(command, "/?", new String[] {
65 ".f90", ".for", ".f"
66 }, new String[] {
67 ".i", ".i90", ".fpp"
68 }, newEnvironment, env);
69 }
70
71
72
73
74
75
76
77
78 @Override
79 public Parser createParser(final File source) {
80 return new FortranParser();
81 }
82
83
84
85
86
87
88
89
90 @Override
91 public Linker getLinker(final LinkType type) {
92 return OpenWatcomFortranLinker.getInstance().getLinker(type);
93 }
94
95 }