Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#360 from jdekonin/osx.umasupport
Browse files Browse the repository at this point in the history
Add OSX platform support to uma
  • Loading branch information
DanHeidinga authored Oct 17, 2017
2 parents e7ab8e3 + 0721177 commit 5769c96
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

import com.ibm.j9.uma.configuration.freemarker.Features;
import com.ibm.j9.uma.configuration.freemarker.Source;
import com.ibm.j9.uma.platform.PlatformOSX;
import com.ibm.j9.uma.platform.PlatformUnix;
import com.ibm.j9.uma.platform.PlatformWindows;
import com.ibm.j9.uma.platform.PlatformZOS;
Expand Down Expand Up @@ -280,6 +281,8 @@ public IPlatform getPlatform() throws UMAException {
|| configurationName.startsWith("ose")
|| configurationName.startsWith("qnx") ) {
platform = new PlatformUnix(this);
} else if ( configurationName.startsWith("osx") ) {
platform = new PlatformOSX(this);
}

}
Expand Down
59 changes: 59 additions & 0 deletions sourcetools/com.ibm.uma/com/ibm/j9/uma/platform/PlatformOSX.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*******************************************************************************
* Copyright (c) 2017, 2017 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*******************************************************************************/
package com.ibm.j9.uma.platform;

import java.util.Vector;

import com.ibm.uma.IConfiguration;
import com.ibm.uma.UMA;
import com.ibm.uma.UMAException;
import com.ibm.uma.om.Artifact;
import com.ibm.uma.om.Export;
import com.ibm.uma.util.FileAssistant;

public class PlatformOSX extends PlatformImplementation {

public PlatformOSX( IConfiguration buildSpec ) {
super(buildSpec);
}

@Override
public String getStaticLibPrefix() {
return "lib";
}

@Override
public String getStaticLibSuffix() {
return ".a";
}

@Override
public String getSharedLibPrefix() {
return "lib";
}

@Override
public String getSharedLibSuffix() {
return ".dylib";
}

}

0 comments on commit 5769c96

Please sign in to comment.