| 1 |
# Copyright 2001 Valentin Pavlov |
| 2 |
# |
| 3 |
# |
| 4 |
# The library loads but java APIs still need some modifications |
| 5 |
# the native - too. |
| 6 |
# |
| 7 |
# A make file for compiling rxtx with lcc contributed by Valentin Pavlov |
| 8 |
# lcc may be downloaded from: http://www.cs.virginia.edu/~lcc-win32/ |
| 9 |
# |
| 10 |
# You will need a config.h file in the src directory. Other builds usually |
| 11 |
# generate them automatically. The following should work. |
| 12 |
#define HAVE_FCNTL_H |
| 13 |
#define HAVE_SIGNAL_H |
| 14 |
#undef HAVE_SYS_FCNTL_H |
| 15 |
#undef HAVE_SYS_FILE_H |
| 16 |
#undef HAVE_SYS_SIGNAL_H |
| 17 |
#undef HAVE_TERMIOS_H |
| 18 |
#undef HAVE_SYS_TIME_H |
| 19 |
# if you know how to create the above in a dos Makefile send in the changes. |
| 20 |
# |
| 21 |
# the following commands should then work fine on the command line. |
| 22 |
# |
| 23 |
# cd src |
| 24 |
# make -f ..\Makefile.lcc |
| 25 |
# |
| 26 |
# You will need to do some programming to get this working. rxtx has moved |
| 27 |
# to full event support and the win32 code has not been updated to reflect |
| 28 |
# the changes. There is no windows parallel port code at this time. |
| 29 |
# |
| 30 |
# Thur Jan 24 2001 put Comments in the Makefile. [email protected]. |
| 31 |
# added javac/javah/jar build rule. |
| 32 |
|
| 33 |
CFLAGS=-I\JDK\INCLUDE -I\jdk\include\win32 -I. |
| 34 |
CC=lcc |
| 35 |
LINKER=lcclnk |
| 36 |
OBJS=init.obj SerialImp.obj termios.obj fuserImp.obj |
| 37 |
SRC=init.c SerialImp.c termios.c fuserImp.c |
| 38 |
LIBS= |
| 39 |
JAVA_HOME=D:\jdk |
| 40 |
|
| 41 |
lib: $(OBJS) |
| 42 |
lcclnk -dll $(OBJS) wsock32.lib -o rxtxSerial.dll |
| 43 |
|
| 44 |
init.obj: RXTXcomm.jar |
| 45 |
$(CC) $(CFLAGS) init.c |
| 46 |
|
| 47 |
SerialImp.obj: RXTXcomm.jar config.h |
| 48 |
$(CC) $(CFLAGS) SerialImp.c |
| 49 |
|
| 50 |
fuserImp.obj: RXTXcomm.jar config.h |
| 51 |
|
| 52 |
termios.obj: RXTXcomm.jar |
| 53 |
$(CC) $(CFLAGS) termios.c |
| 54 |
|
| 55 |
RXTXcomm.jar: |
| 56 |
javac -d . -O *.java |
| 57 |
jar -cf RXTXcomm.jar gnu |
| 58 |
javah -jni gnu.io.RXTXPort gnu.io.RXTXCommDriver |
| 59 |
|
| 60 |
config.h: |
| 61 |
echo please read how to create config.h in the Makefile |
| 62 |
|
| 63 |
install: |
| 64 |
copy rxtxSerial.dll $(JAVA_HOME)\jre\bin |
| 65 |
copy RXTXcomm.jar $(JAVA_HOME)\jre\lib\ext |