Mac OS Makefile updates.
This commit is contained in:
parent
422304c2d0
commit
f0c717c1a3
|
@ -16,13 +16,12 @@ JAVAC := javac
|
|||
JAVAH := javah -jni
|
||||
JFLAGS := -source 1.6 -target 1.6 -Xlint:-options
|
||||
LIBRARY_NAME := libjSerialComm.jnilib
|
||||
SOURCES := SerialPort_OSX.c OSXHelperFunctions.c
|
||||
JAVA_SOURCE_DIR = ../../../../src/main/java/com/fazecast/jSerialComm
|
||||
RESOURCE_DIR = ../../../../src/main/resources/OSX
|
||||
BUILD_DIR = ../../../../bin/OSX
|
||||
JAVA_CLASS_DIR = $(BUILD_DIR)/../com/fazecast/jSerialComm
|
||||
OBJECTSx86 = $(BUILD_DIR)/x86/$(SOURCES:.c=.o)
|
||||
OBJECTSx86_64 = $(BUILD_DIR)/x86_64/$(SOURCES:.c=.o)
|
||||
OBJECTSx86 = $(BUILD_DIR)/x86/SerialPort_OSX.o $(BUILD_DIR)/x86/OSXHelperFunctions.o
|
||||
OBJECTSx86_64 = $(BUILD_DIR)/x86_64/SerialPort_OSX.o $(BUILD_DIR)/x86_64/OSXHelperFunctions.o
|
||||
JNI_HEADER = ../com_fazecast_jSerialComm_SerialPort.h
|
||||
JAVA_CLASS = $(JAVA_CLASS_DIR)/SerialPort.class
|
||||
|
||||
|
|
|
@ -71,15 +71,4 @@ speed_t getBaudRateCode(speed_t baudRate)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void setBaudRate(int portFD, speed_t baudRate)
|
||||
{
|
||||
struct termios2 options = { 0 };
|
||||
ioctl(portFD, TCGETS2, &options);
|
||||
options.c_cflag &= ~CBAUD;
|
||||
options.c_cflag |= BOTHER;
|
||||
options.c_ispeed = baudRate;
|
||||
options.c_ospeed = baudRate;
|
||||
ioctl(portFD, TCSETS2, &options);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,6 +29,5 @@
|
|||
#include <termios.h>
|
||||
|
||||
speed_t getBaudRateCode(speed_t baudRate);
|
||||
void setBaudRate(int portFD, speed_t baudRate);
|
||||
|
||||
#endif // #ifndef __OSX_HELPER_FUNCTIONS_HEADER_H__
|
||||
|
|
Loading…
Reference in New Issue