Testing out the PPD42 Air Quality Sensor, with an MSP430 Launchpad and graphing the data with GNUplot.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.2 KiB

5 years ago
  1. # ----
  2. # The original author is Eugene Melekhov <eugene_melekhov@mail.ru>
  3. # Object Tools http://www.object-tools.com
  4. # Contributed to rxtx Wed Sep 8 2004
  5. # Reportedly builds rxtxSerial.dll but rxtxParallel.dll is untested.
  6. # Accepted as is by taj@www.linux.org.uk
  7. # ---
  8. # This is the first quick and durty attempt to compile rxtx for Windows
  9. # using Microsoft Visual C compiler. I've done this mostly to debug rxtx
  10. # with Microsoft debugger
  11. #
  12. # This makefile was made for MSVC 6.0. I'm afraid that debug info command
  13. # line switches like /Z7 -debugtype:CV -pdb:NONE won't work with
  14. # MSVC 7.0 or above.
  15. #
  16. # The serial port library seems to be working, execept the hangup while
  17. # writing to unpluged serial port. BTW the mingw32 library behavior
  18. # is the same.
  19. #
  20. # Parallel port library compiles, but I have not used it
  21. #
  22. # To build rxtx library execute commands like the following
  23. # mkdir build
  24. # copy Makefile.msc build\Makefile
  25. # cd build
  26. # nmake
  27. #
  28. # To build only serial/parallel library use
  29. # nmake serial
  30. # or
  31. # nmake parallel
  32. #
  33. # If you wish to make the version with debug info then do something
  34. # like this
  35. # nmake serial DEBUG_INFO=1
  36. #
  37. # 'nmake clean' will remove all object dll and other working files
  38. #
  39. # Please make sure that variable JAVA_HOME points to the place where
  40. # your Java SDK is located
  41. #
  42. JAVA_HOME = D:\j2sdk1.4.2_04
  43. JAVAC = $(JAVA_HOME)\bin\javac
  44. JAR = $(JAVA_HOME)\bin\jar
  45. JAVAH = $(JAVA_HOME)\bin\javah
  46. SRC=..\src
  47. CFLAGS= -nologo -I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32 -I$(SRC) -I. -DWIN32
  48. LINK_FLAGS = -nologo -map -incremental:no
  49. !IFDEF DEBUG_INFO
  50. CFLAGS = -Z7 -Oi -Oy- $(CFLAGS)
  51. CFLAGS_DLL = $(CFLAGS_DLL) -GZ
  52. LINK_FLAGS = $(LINK_FLAGS) -debug -debugtype:CV -pdb:NONE
  53. DEBUG_INFO_FLAG = DEBUG_INFO^=1
  54. !ELSE
  55. CFLAGS = $(CFLAGS) -Ox
  56. !ENDIF
  57. OBJS=init.obj SerialImp.obj termios.obj fuserImp.obj
  58. PARALLEL_OBJS= ParallelImp.obj termios.obj init.obj
  59. all: serial parallel
  60. serial: RXTXcomm.jar rxtxSerial.dll
  61. parallel: RXTXcomm.jar rxtxParallel.dll
  62. init.obj: config.h
  63. $(CC) $(CFLAGS) /TP -c $(SRC)\init.cc
  64. fixup.obj: config.h
  65. $(CC) $(CFLAGS) -c $(SRC)\fixup.c
  66. fuserImp.obj: config.h gnu_io_CommPortIdentifier.h
  67. $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c
  68. termios.obj:
  69. $(CC) $(CFLAGS) -c $(SRC)/termios.c
  70. SerialImp.obj: config.h gnu_io_RXTXPort.h
  71. $(CC) $(CFLAGS) -c $(SRC)\SerialImp.c
  72. ParallelImp.obj: config.h gnu_io_LPRPort.h
  73. $(CC) $(CFLAGS) -c $(SRC)\ParallelImp.c
  74. rxtxSerial.dll: $(OBJS)
  75. link -dll -out:$@ $** $(LINK_FLAGS)
  76. rxtxParallel.dll: $(PARALLEL_OBJS)
  77. link -dll -out:$@ $** $(LINK_FLAGS)
  78. gnu_io_RXTXPort.h gnu_io_CommPortIdentifier.h gnu_io_LPRPort.h: RXTXcomm.jar
  79. $(JAVAH) -jni gnu.io.RXTXPort gnu.io.CommPortIdentifier gnu.io.LPRPort
  80. RXTXcomm.jar:
  81. $(JAVAC) -d . ..\src\*.java
  82. $(JAR) -cf RXTXcomm.jar gnu
  83. config.h: Makefile
  84. echo #define HAVE_FCNTL_H >> config.h
  85. echo #define HAVE_SIGNAL_H >> config.h
  86. echo #undef HAVE_SYS_FCNTL_H >> config.h
  87. echo #undef HAVE_SYS_FILE_H >> config.h
  88. echo #undef HAVE_SYS_SIGNAL_H >> config.h
  89. echo #undef HAVE_TERMIOS_H >> config.h
  90. echo #undef HAVE_SYS_TIME_H >> config.h
  91. clean:
  92. -rmdir /s /q gnu
  93. -del *.obj *.h RXTXcomm.jar rxtxSerial.* rxtxParallel.*