Updating Mac Makefile and installation documentation.
This commit is contained in:
parent
51c4cae9d9
commit
56586964d4
5
INSTALL
5
INSTALL
|
@ -39,10 +39,7 @@ The resulting jSerialComm library can be found in the project directory ".../jSe
|
|||
MAC OS X
|
||||
----------
|
||||
|
||||
Ensure that Xcode is installed on your system. If it is not, it can be downloaded via the App Store.
|
||||
|
||||
Ensure that the JDK_HOME environment variable has been set for the 1.6 version of your Java SDK. The correct directory can usually be found by entering the following command: readlink -f /usr/bin/java
|
||||
Export the result of this command UP TO BUT NOT INCLUDING the /jre/... portion using the 'export' command. For example, if 'readlink' produced "/usr/lib/jvm/java-6-jdk/jre/bin/java" as an output, the export command would look like: export JDK_HOME=/usr/lib/jvm/java-6-jdk
|
||||
Ensure that Xcode is installed on your system. If it is not, it can be downloaded via the App Store. You must also make sure that the Xcode Command Line Tools are installed. This can be done by entering the following command in a terminal: xcode-select --install
|
||||
|
||||
Change directories to the following project directory: ".../jSerialComm/src/main/cpp/OSX/"
|
||||
|
||||
|
|
|
@ -251,12 +251,10 @@ JNIEXPORT jint JNICALL Java_com_fazecast_jSerialComm_SerialPort_waitForEvent(JNI
|
|||
int serialFD = (int)env->GetLongField(obj, env->GetFieldID(serialCommClass, "portHandle", "J"));
|
||||
|
||||
// Initialize the waiting set and the timeouts
|
||||
struct timeval timeout;
|
||||
struct timeval timeout = { 1, 0 };
|
||||
fd_set waitingSet;
|
||||
FD_ZERO(&waitingSet);
|
||||
FD_SET(serialFD, &waitingSet);
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
// Wait for a serial port event
|
||||
int retVal = select(serialFD + 1, &waitingSet, NULL, NULL, &timeout);
|
||||
|
|
|
@ -11,6 +11,7 @@ COPY := @cp
|
|||
MOVE := @mv
|
||||
PRINT := @echo
|
||||
FULL_CLASS := com.fazecast.jSerialComm.SerialPort
|
||||
JDK_HOME = /System/Library/Frameworks/JavaVM.framework/Versions/Current
|
||||
JAVAC := "$(JDK_HOME)/bin/javac"
|
||||
JAVAH := "$(JDK_HOME)/bin/javah" -jni
|
||||
JFLAGS := -source 1.6 -target 1.6 -Xlint:-options
|
||||
|
|
|
@ -257,12 +257,10 @@ JNIEXPORT jint JNICALL Java_com_fazecast_jSerialComm_SerialPort_waitForEvent(JNI
|
|||
int serialFD = (int)env->GetLongField(obj, env->GetFieldID(serialCommClass, "portHandle", "J"));
|
||||
|
||||
// Initialize the waiting set and the timeouts
|
||||
struct timeval timeout;
|
||||
struct timeval timeout = { 1, 0 };
|
||||
fd_set waitingSet;
|
||||
FD_ZERO(&waitingSet);
|
||||
FD_SET(serialFD, &waitingSet);
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
// Wait for a serial port event
|
||||
int retVal = select(serialFD + 1, &waitingSet, NULL, NULL, &timeout);
|
||||
|
|
Loading…
Reference in New Issue