PageRenderTime 271ms CodeModel.GetById 101ms app.highlight 5ms RepoModel.GetById 116ms app.codeStats 0ms

/src/org/ooc/frontend/compilers/AbstractCompiler.java

http://github.com/nddrylliog/ooc
Java | 62 lines | 23 code | 21 blank | 18 comment | 0 complexity | 522147b7a12a0e4f91590324c4cd0bd1 MD5 | raw file
 1package org.ooc.frontend.compilers;
 2
 3import java.io.IOException;
 4
 5/**
 6 * The doc is relative to gcc, since it's the compiler I'm most familiar with.
 7 * 
 8 * @author Amos Wenger
 9 */
10public interface AbstractCompiler {
11
12	public void setExecutable(String executableName);
13	
14	/** -o option in gcc */
15	public void setOutputPath(String path);
16	
17	/** -I option in gcc */
18	public void addIncludePath(String path);
19	
20	/** -L option in gcc */
21	public void addLibraryPath(String path);
22	
23	/** -l option in gcc */
24	public void addDynamicLibrary(String library);
25	
26	/** -c option in gcc */
27	public void setCompileOnly();
28	
29	/** -g option in gcc */
30	public void setDebugEnabled();
31	
32	/** .o file to link with */
33	public void addObjectFile(String path);
34	
35	/** -D option in gcc */
36	public void defineSymbol(String symbolName);
37	
38	/** -U option in gcc */
39	public void undefineSymbol(String symbolName);
40	
41	/** multiple -arch options in gcc */
42	public void setFatArchitectures(String[] archs);
43	
44	/** -isysroot /Developer/SDKs/MacOSXxxx.sdk -mmacosx-version-min=xxx in gcc */
45	public void setOSXSDKAndDeploymentTarget(String version);
46	
47	/** any compiler-specific option */
48	public void addOption(String option);
49	
50	/** @return the exit code of the compiler */
51	public int launch() throws IOException, InterruptedException;
52
53	public boolean supportsDeclInFor();
54	public boolean supportsVLAs();
55	
56	public void reset();
57
58	public String getCommandLine();
59	
60	public AbstractCompiler clone();
61	
62}