View Javadoc

1   /*
2    * #%L
3    * Native ARchive plugin for Maven
4    * %%
5    * Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6    * %%
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   * 
11   * http://www.apache.org/licenses/LICENSE-2.0
12   * 
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * #L%
19   */
20  package com.github.maven_nar.cpptasks.ti;
21  
22  import java.io.File;
23  import java.util.Vector;
24  
25  import com.github.maven_nar.cpptasks.compiler.CommandLineLinker;
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.types.LibraryTypeEnum;
29  
30  /**
31   *
32   * Adapter for TI DSP librarian
33   * *
34   * 
35   * @author CurtA
36   */
37  public class ClxxLibrarian extends CommandLineLinker {
38    private static final ClxxLibrarian cl55Instance = new ClxxLibrarian("ar55");
39    private static final ClxxLibrarian cl6xInstance = new ClxxLibrarian("ar6x");
40  
41    public static ClxxLibrarian getCl55Instance() {
42      return cl55Instance;
43    }
44  
45    public static ClxxLibrarian getCl6xInstance() {
46      return cl6xInstance;
47    }
48  
49    private ClxxLibrarian(final String command) {
50      super(command, null, new String[] {
51        ".o"
52      }, new String[0], ".lib", false, null);
53    }
54  
55    protected void addBase(final long base, final Vector<String> args) {
56      // TODO Auto-generated method stub
57    }
58  
59    protected void addEntry(final String entry, final Vector<String> args) {
60    }
61  
62    protected void addFixed(final Boolean fixed, final Vector<String> args) {
63      // TODO Auto-generated method stub
64    }
65  
66    protected void addImpliedArgs(final boolean debug, final LinkType linkType, final Vector<String> args) {
67      // TODO Auto-generated method stub
68    }
69  
70    protected void addIncremental(final boolean incremental, final Vector<String> args) {
71      // TODO Auto-generated method stub
72    }
73  
74    protected void addMap(final boolean map, final Vector<String> args) {
75      // TODO Auto-generated method stub
76    }
77  
78    protected void addStack(final int stack, final Vector<String> args) {
79      // TODO Auto-generated method stub
80    }
81  
82    @Override
83    protected String getCommandFileSwitch(final String commandFile) {
84      return "@" + commandFile;
85    }
86  
87    @Override
88    public File[] getLibraryPath() {
89      return new File[0];
90    }
91  
92    @Override
93    public String[] getLibraryPatterns(final String[] libnames, final LibraryTypeEnum libType) {
94      return new String[0];
95    }
96  
97    @Override
98    public Linker getLinker(final LinkType linkType) {
99      return null;
100   }
101 
102   @Override
103   protected int getMaximumCommandLength() {
104     return 1024;
105   }
106 
107   @Override
108   protected String[] getOutputFileSwitch(final String outputFile) {
109     return new String[] {
110         "-o", outputFile
111     };
112   }
113 
114   @Override
115   public boolean isCaseSensitive() {
116     // TODO Auto-generated method stub
117     return false;
118   }
119 }