##// END OF EJS Templates
Improved linux support
yannic -
r11:8c2d8af9e068 alexis
parent child
Show More
@@ -1,599 +1,598
1 # Makefile.in generated by automake 1.11.1 from Makefile.am.
1 # Makefile.in generated by automake 1.11.1 from Makefile.am.
2 # @configure_input@
2 # @configure_input@
3
3
4 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6 # Inc.
6 # Inc.
7 # This Makefile.in is free software; the Free Software Foundation
7 # This Makefile.in is free software; the Free Software Foundation
8 # gives unlimited permission to copy and/or distribute it,
8 # gives unlimited permission to copy and/or distribute it,
9 # with or without modifications, as long as this notice is preserved.
9 # with or without modifications, as long as this notice is preserved.
10
10
11 # This program is distributed in the hope that it will be useful,
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 # PARTICULAR PURPOSE.
14 # PARTICULAR PURPOSE.
15
15
16 @SET_MAKE@
16 @SET_MAKE@
17
17
18
18
19
19
20 VPATH = @srcdir@
20 VPATH = @srcdir@
21 pkgdatadir = $(datadir)/@PACKAGE@
21 pkgdatadir = $(datadir)/@PACKAGE@
22 pkgincludedir = $(includedir)/@PACKAGE@
22 pkgincludedir = $(includedir)/@PACKAGE@
23 pkglibdir = $(libdir)/@PACKAGE@
23 pkglibdir = $(libdir)/@PACKAGE@
24 pkglibexecdir = $(libexecdir)/@PACKAGE@
24 pkglibexecdir = $(libexecdir)/@PACKAGE@
25 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
26 install_sh_DATA = $(install_sh) -c -m 644
26 install_sh_DATA = $(install_sh) -c -m 644
27 install_sh_PROGRAM = $(install_sh) -c
27 install_sh_PROGRAM = $(install_sh) -c
28 install_sh_SCRIPT = $(install_sh) -c
28 install_sh_SCRIPT = $(install_sh) -c
29 INSTALL_HEADER = $(INSTALL_DATA)
29 INSTALL_HEADER = $(INSTALL_DATA)
30 transform = $(program_transform_name)
30 transform = $(program_transform_name)
31 NORMAL_INSTALL = :
31 NORMAL_INSTALL = :
32 PRE_INSTALL = :
32 PRE_INSTALL = :
33 POST_INSTALL = :
33 POST_INSTALL = :
34 NORMAL_UNINSTALL = :
34 NORMAL_UNINSTALL = :
35 PRE_UNINSTALL = :
35 PRE_UNINSTALL = :
36 POST_UNINSTALL = :
36 POST_UNINSTALL = :
37 build_triplet = @build@
37 build_triplet = @build@
38 host_triplet = @host@
38 host_triplet = @host@
39 subdir = src
39 subdir = src
40 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
40 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
41 $(srcdir)/Makefile.in $(srcdir)/rs232config.h.in
41 $(srcdir)/Makefile.in $(srcdir)/rs232config.h.in
42 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
43 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
43 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
44 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
45 $(ACLOCAL_M4)
45 $(ACLOCAL_M4)
46 mkinstalldirs = $(install_sh) -d
46 mkinstalldirs = $(install_sh) -d
47 CONFIG_HEADER = rs232config.h
47 CONFIG_HEADER = rs232config.h
48 CONFIG_CLEAN_FILES =
48 CONFIG_CLEAN_FILES =
49 CONFIG_CLEAN_VPATH_FILES =
49 CONFIG_CLEAN_VPATH_FILES =
50 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
50 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
51 am__vpath_adj = case $$p in \
51 am__vpath_adj = case $$p in \
52 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
52 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
53 *) f=$$p;; \
53 *) f=$$p;; \
54 esac;
54 esac;
55 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
55 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
56 am__install_max = 40
56 am__install_max = 40
57 am__nobase_strip_setup = \
57 am__nobase_strip_setup = \
58 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
58 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
59 am__nobase_strip = \
59 am__nobase_strip = \
60 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
60 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
61 am__nobase_list = $(am__nobase_strip_setup); \
61 am__nobase_list = $(am__nobase_strip_setup); \
62 for p in $$list; do echo "$$p $$p"; done | \
62 for p in $$list; do echo "$$p $$p"; done | \
63 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
63 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
64 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
64 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
65 if (++n[$$2] == $(am__install_max)) \
65 if (++n[$$2] == $(am__install_max)) \
66 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
66 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
67 END { for (dir in files) print dir, files[dir] }'
67 END { for (dir in files) print dir, files[dir] }'
68 am__base_list = \
68 am__base_list = \
69 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
69 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
70 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
70 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
71 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
71 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
72 "$(DESTDIR)$(includedir)"
72 "$(DESTDIR)$(includedir)"
73 LTLIBRARIES = $(lib_LTLIBRARIES)
73 LTLIBRARIES = $(lib_LTLIBRARIES)
74 librs232_@RS232_API_VERSION@_la_LIBADD =
74 librs232_@RS232_API_VERSION@_la_LIBADD =
75 am_librs232_@RS232_API_VERSION@_la_OBJECTS = RS232_unix.lo \
75 am_librs232_@RS232_API_VERSION@_la_OBJECTS = RS232_unix.lo \
76 RS232_win.lo
76 RS232_win.lo
77 librs232_@RS232_API_VERSION@_la_OBJECTS = \
77 librs232_@RS232_API_VERSION@_la_OBJECTS = \
78 $(am_librs232_@RS232_API_VERSION@_la_OBJECTS)
78 $(am_librs232_@RS232_API_VERSION@_la_OBJECTS)
79 librs232_@RS232_API_VERSION@_la_LINK = $(LIBTOOL) --tag=CC \
79 librs232_@RS232_API_VERSION@_la_LINK = $(LIBTOOL) --tag=CC \
80 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
80 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
81 $(AM_CFLAGS) $(CFLAGS) \
81 $(AM_CFLAGS) $(CFLAGS) \
82 $(librs232_@RS232_API_VERSION@_la_LDFLAGS) $(LDFLAGS) -o $@
82 $(librs232_@RS232_API_VERSION@_la_LDFLAGS) $(LDFLAGS) -o $@
83 DEFAULT_INCLUDES = -I.@am__isrc@
83 DEFAULT_INCLUDES = -I.@am__isrc@
84 depcomp = $(SHELL) $(top_srcdir)/depcomp
84 depcomp = $(SHELL) $(top_srcdir)/depcomp
85 am__depfiles_maybe = depfiles
85 am__depfiles_maybe = depfiles
86 am__mv = mv -f
86 am__mv = mv -f
87 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
87 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
88 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
88 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
89 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
89 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
90 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
90 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
91 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
91 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
92 CCLD = $(CC)
92 CCLD = $(CC)
93 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
93 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
94 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
94 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
95 $(LDFLAGS) -o $@
95 $(LDFLAGS) -o $@
96 SOURCES = $(librs232_@RS232_API_VERSION@_la_SOURCES)
96 SOURCES = $(librs232_@RS232_API_VERSION@_la_SOURCES)
97 DIST_SOURCES = $(librs232_@RS232_API_VERSION@_la_SOURCES)
97 DIST_SOURCES = $(librs232_@RS232_API_VERSION@_la_SOURCES)
98 DATA = $(pkgconfig_DATA)
98 DATA = $(pkgconfig_DATA)
99 HEADERS = $(include_HEADERS)
99 HEADERS = $(include_HEADERS)
100 ETAGS = etags
100 ETAGS = etags
101 CTAGS = ctags
101 CTAGS = ctags
102 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
102 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
103 ACLOCAL = @ACLOCAL@
103 ACLOCAL = @ACLOCAL@
104 AMTAR = @AMTAR@
104 AMTAR = @AMTAR@
105 AR = @AR@
105 AR = @AR@
106 AS = @AS@
106 AS = @AS@
107 AUTOCONF = @AUTOCONF@
107 AUTOCONF = @AUTOCONF@
108 AUTOHEADER = @AUTOHEADER@
108 AUTOHEADER = @AUTOHEADER@
109 AUTOMAKE = @AUTOMAKE@
109 AUTOMAKE = @AUTOMAKE@
110 AWK = @AWK@
110 AWK = @AWK@
111 CC = @CC@
111 CC = @CC@
112 CCDEPMODE = @CCDEPMODE@
112 CCDEPMODE = @CCDEPMODE@
113 CFLAGS = @CFLAGS@
113 CFLAGS = @CFLAGS@
114 CPP = @CPP@
114 CPP = @CPP@
115 CPPFLAGS = @CPPFLAGS@
115 CPPFLAGS = @CPPFLAGS@
116 CYGPATH_W = @CYGPATH_W@
116 CYGPATH_W = @CYGPATH_W@
117 DEFS = @DEFS@
117 DEFS = @DEFS@
118 DEPDIR = @DEPDIR@
118 DEPDIR = @DEPDIR@
119 DLLTOOL = @DLLTOOL@
119 DLLTOOL = @DLLTOOL@
120 DSYMUTIL = @DSYMUTIL@
120 DSYMUTIL = @DSYMUTIL@
121 DUMPBIN = @DUMPBIN@
121 DUMPBIN = @DUMPBIN@
122 ECHO_C = @ECHO_C@
122 ECHO_C = @ECHO_C@
123 ECHO_N = @ECHO_N@
123 ECHO_N = @ECHO_N@
124 ECHO_T = @ECHO_T@
124 ECHO_T = @ECHO_T@
125 EGREP = @EGREP@
125 EGREP = @EGREP@
126 EXEEXT = @EXEEXT@
126 EXEEXT = @EXEEXT@
127 FGREP = @FGREP@
127 FGREP = @FGREP@
128 GREP = @GREP@
128 GREP = @GREP@
129 INSTALL = @INSTALL@
129 INSTALL = @INSTALL@
130 INSTALL_DATA = @INSTALL_DATA@
130 INSTALL_DATA = @INSTALL_DATA@
131 INSTALL_PROGRAM = @INSTALL_PROGRAM@
131 INSTALL_PROGRAM = @INSTALL_PROGRAM@
132 INSTALL_SCRIPT = @INSTALL_SCRIPT@
132 INSTALL_SCRIPT = @INSTALL_SCRIPT@
133 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
133 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
134 LD = @LD@
134 LD = @LD@
135 LDFLAGS = @LDFLAGS@
135 LDFLAGS = @LDFLAGS@
136 LIBOBJS = @LIBOBJS@
136 LIBOBJS = @LIBOBJS@
137 LIBS = @LIBS@
137 LIBS = @LIBS@
138 LIBTOOL = @LIBTOOL@
138 LIBTOOL = @LIBTOOL@
139 LIPO = @LIPO@
139 LIPO = @LIPO@
140 LN_S = @LN_S@
140 LN_S = @LN_S@
141 LTLIBOBJS = @LTLIBOBJS@
141 LTLIBOBJS = @LTLIBOBJS@
142 MAKEINFO = @MAKEINFO@
142 MAKEINFO = @MAKEINFO@
143 MANIFEST_TOOL = @MANIFEST_TOOL@
144 MKDIR_P = @MKDIR_P@
143 MKDIR_P = @MKDIR_P@
145 NM = @NM@
144 NM = @NM@
146 NMEDIT = @NMEDIT@
145 NMEDIT = @NMEDIT@
147 OBJDUMP = @OBJDUMP@
146 OBJDUMP = @OBJDUMP@
148 OBJEXT = @OBJEXT@
147 OBJEXT = @OBJEXT@
149 OTOOL = @OTOOL@
148 OTOOL = @OTOOL@
150 OTOOL64 = @OTOOL64@
149 OTOOL64 = @OTOOL64@
151 PACKAGE = @PACKAGE@
150 PACKAGE = @PACKAGE@
152 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
151 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
153 PACKAGE_NAME = @PACKAGE_NAME@
152 PACKAGE_NAME = @PACKAGE_NAME@
154 PACKAGE_STRING = @PACKAGE_STRING@
153 PACKAGE_STRING = @PACKAGE_STRING@
155 PACKAGE_TARNAME = @PACKAGE_TARNAME@
154 PACKAGE_TARNAME = @PACKAGE_TARNAME@
156 PACKAGE_URL = @PACKAGE_URL@
155 PACKAGE_URL = @PACKAGE_URL@
157 PACKAGE_VERSION = @PACKAGE_VERSION@
156 PACKAGE_VERSION = @PACKAGE_VERSION@
158 PATH_SEPARATOR = @PATH_SEPARATOR@
157 PATH_SEPARATOR = @PATH_SEPARATOR@
159 RANLIB = @RANLIB@
158 RANLIB = @RANLIB@
160 RS232_API_VERSION = @RS232_API_VERSION@
159 RS232_API_VERSION = @RS232_API_VERSION@
161 RS232_SO_VERSION = @RS232_SO_VERSION@
160 RS232_SO_VERSION = @RS232_SO_VERSION@
162 SED = @SED@
161 SED = @SED@
163 SET_MAKE = @SET_MAKE@
162 SET_MAKE = @SET_MAKE@
164 SHELL = @SHELL@
163 SHELL = @SHELL@
165 STRIP = @STRIP@
164 STRIP = @STRIP@
166 VERSION = @VERSION@
165 VERSION = @VERSION@
167 abs_builddir = @abs_builddir@
166 abs_builddir = @abs_builddir@
168 abs_srcdir = @abs_srcdir@
167 abs_srcdir = @abs_srcdir@
169 abs_top_builddir = @abs_top_builddir@
168 abs_top_builddir = @abs_top_builddir@
170 abs_top_srcdir = @abs_top_srcdir@
169 abs_top_srcdir = @abs_top_srcdir@
171 ac_ct_AR = @ac_ct_AR@
172 ac_ct_CC = @ac_ct_CC@
170 ac_ct_CC = @ac_ct_CC@
173 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
171 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
174 am__include = @am__include@
172 am__include = @am__include@
175 am__leading_dot = @am__leading_dot@
173 am__leading_dot = @am__leading_dot@
176 am__quote = @am__quote@
174 am__quote = @am__quote@
177 am__tar = @am__tar@
175 am__tar = @am__tar@
178 am__untar = @am__untar@
176 am__untar = @am__untar@
179 bindir = @bindir@
177 bindir = @bindir@
180 build = @build@
178 build = @build@
181 build_alias = @build_alias@
179 build_alias = @build_alias@
182 build_cpu = @build_cpu@
180 build_cpu = @build_cpu@
183 build_os = @build_os@
181 build_os = @build_os@
184 build_vendor = @build_vendor@
182 build_vendor = @build_vendor@
185 builddir = @builddir@
183 builddir = @builddir@
186 datadir = @datadir@
184 datadir = @datadir@
187 datarootdir = @datarootdir@
185 datarootdir = @datarootdir@
188 docdir = @docdir@
186 docdir = @docdir@
189 dvidir = @dvidir@
187 dvidir = @dvidir@
190 exec_prefix = @exec_prefix@
188 exec_prefix = @exec_prefix@
191 host = @host@
189 host = @host@
192 host_alias = @host_alias@
190 host_alias = @host_alias@
193 host_cpu = @host_cpu@
191 host_cpu = @host_cpu@
194 host_os = @host_os@
192 host_os = @host_os@
195 host_vendor = @host_vendor@
193 host_vendor = @host_vendor@
196 htmldir = @htmldir@
194 htmldir = @htmldir@
197 includedir = @includedir@
195 includedir = @includedir@
198 infodir = @infodir@
196 infodir = @infodir@
199 install_sh = @install_sh@
197 install_sh = @install_sh@
200 libdir = @libdir@
198 libdir = @libdir@
201 libexecdir = @libexecdir@
199 libexecdir = @libexecdir@
202 localedir = @localedir@
200 localedir = @localedir@
203 localstatedir = @localstatedir@
201 localstatedir = @localstatedir@
202 lt_ECHO = @lt_ECHO@
204 mandir = @mandir@
203 mandir = @mandir@
205 mkdir_p = @mkdir_p@
204 mkdir_p = @mkdir_p@
206 oldincludedir = @oldincludedir@
205 oldincludedir = @oldincludedir@
207 pdfdir = @pdfdir@
206 pdfdir = @pdfdir@
208 prefix = @prefix@
207 prefix = @prefix@
209 program_transform_name = @program_transform_name@
208 program_transform_name = @program_transform_name@
210 psdir = @psdir@
209 psdir = @psdir@
211 sbindir = @sbindir@
210 sbindir = @sbindir@
212 sharedstatedir = @sharedstatedir@
211 sharedstatedir = @sharedstatedir@
213 srcdir = @srcdir@
212 srcdir = @srcdir@
214 sysconfdir = @sysconfdir@
213 sysconfdir = @sysconfdir@
215 target_alias = @target_alias@
214 target_alias = @target_alias@
216 top_build_prefix = @top_build_prefix@
215 top_build_prefix = @top_build_prefix@
217 top_builddir = @top_builddir@
216 top_builddir = @top_builddir@
218 top_srcdir = @top_srcdir@
217 top_srcdir = @top_srcdir@
219 lib_LTLIBRARIES = librs232-@RS232_API_VERSION@.la
218 lib_LTLIBRARIES = librs232-@RS232_API_VERSION@.la
220 librs232_@RS232_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(RS232_SO_VERSION)
219 librs232_@RS232_API_VERSION@_la_LDFLAGS = -no-undefined -version-info $(RS232_SO_VERSION)
221 rs232_includedir = $(includedir)/rs232-$(RS232_API_VERSION)
220 rs232_includedir = $(includedir)/rs232-$(RS232_API_VERSION)
222 rs232_libincludedir = $(libdir)/rs232-$(RS232_API_VERSION)/include
221 rs232_libincludedir = $(libdir)/rs232-$(RS232_API_VERSION)/include
223 librs232_@RS232_API_VERSION@_la_SOURCES = \
222 librs232_@RS232_API_VERSION@_la_SOURCES = \
224 RS232_unix.c \
223 RS232_unix.c \
225 RS232_win.c
224 RS232_win.c
226
225
227 include_HEADERS = RS232.h rs232config.h
226 include_HEADERS = RS232.h rs232config.h
228 pkgconfigdir = $(libdir)/pkgconfig
227 pkgconfigdir = $(libdir)/pkgconfig
229 pkgconfig_DATA = ../rs232-@RS232_API_VERSION@.pc
228 pkgconfig_DATA = ../rs232-@RS232_API_VERSION@.pc
230 all: rs232config.h
229 all: rs232config.h
231 $(MAKE) $(AM_MAKEFLAGS) all-am
230 $(MAKE) $(AM_MAKEFLAGS) all-am
232
231
233 .SUFFIXES:
232 .SUFFIXES:
234 .SUFFIXES: .c .lo .o .obj
233 .SUFFIXES: .c .lo .o .obj
235 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
234 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
236 @for dep in $?; do \
235 @for dep in $?; do \
237 case '$(am__configure_deps)' in \
236 case '$(am__configure_deps)' in \
238 *$$dep*) \
237 *$$dep*) \
239 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
238 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
240 && { if test -f $@; then exit 0; else break; fi; }; \
239 && { if test -f $@; then exit 0; else break; fi; }; \
241 exit 1;; \
240 exit 1;; \
242 esac; \
241 esac; \
243 done; \
242 done; \
244 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
243 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
245 $(am__cd) $(top_srcdir) && \
244 $(am__cd) $(top_srcdir) && \
246 $(AUTOMAKE) --foreign src/Makefile
245 $(AUTOMAKE) --foreign src/Makefile
247 .PRECIOUS: Makefile
246 .PRECIOUS: Makefile
248 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
247 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
249 @case '$?' in \
248 @case '$?' in \
250 *config.status*) \
249 *config.status*) \
251 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
250 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
252 *) \
251 *) \
253 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
252 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
254 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
253 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
255 esac;
254 esac;
256
255
257 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
256 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
258 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
257 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
259
258
260 $(top_srcdir)/configure: $(am__configure_deps)
259 $(top_srcdir)/configure: $(am__configure_deps)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
260 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
261 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
263 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
264 $(am__aclocal_m4_deps):
263 $(am__aclocal_m4_deps):
265
264
266 rs232config.h: stamp-h1
265 rs232config.h: stamp-h1
267 @if test ! -f $@; then \
266 @if test ! -f $@; then \
268 rm -f stamp-h1; \
267 rm -f stamp-h1; \
269 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
268 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
270 else :; fi
269 else :; fi
271
270
272 stamp-h1: $(srcdir)/rs232config.h.in $(top_builddir)/config.status
271 stamp-h1: $(srcdir)/rs232config.h.in $(top_builddir)/config.status
273 @rm -f stamp-h1
272 @rm -f stamp-h1
274 cd $(top_builddir) && $(SHELL) ./config.status src/rs232config.h
273 cd $(top_builddir) && $(SHELL) ./config.status src/rs232config.h
275 $(srcdir)/rs232config.h.in: $(am__configure_deps)
274 $(srcdir)/rs232config.h.in: $(am__configure_deps)
276 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
275 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
277 rm -f stamp-h1
276 rm -f stamp-h1
278 touch $@
277 touch $@
279
278
280 distclean-hdr:
279 distclean-hdr:
281 -rm -f rs232config.h stamp-h1
280 -rm -f rs232config.h stamp-h1
282 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
281 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
283 @$(NORMAL_INSTALL)
282 @$(NORMAL_INSTALL)
284 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
283 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
285 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
284 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
286 list2=; for p in $$list; do \
285 list2=; for p in $$list; do \
287 if test -f $$p; then \
286 if test -f $$p; then \
288 list2="$$list2 $$p"; \
287 list2="$$list2 $$p"; \
289 else :; fi; \
288 else :; fi; \
290 done; \
289 done; \
291 test -z "$$list2" || { \
290 test -z "$$list2" || { \
292 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
291 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
293 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
292 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
294 }
293 }
295
294
296 uninstall-libLTLIBRARIES:
295 uninstall-libLTLIBRARIES:
297 @$(NORMAL_UNINSTALL)
296 @$(NORMAL_UNINSTALL)
298 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
297 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
299 for p in $$list; do \
298 for p in $$list; do \
300 $(am__strip_dir) \
299 $(am__strip_dir) \
301 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
300 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
302 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
301 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
303 done
302 done
304
303
305 clean-libLTLIBRARIES:
304 clean-libLTLIBRARIES:
306 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
305 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
307 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
306 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
308 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
307 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
309 test "$$dir" != "$$p" || dir=.; \
308 test "$$dir" != "$$p" || dir=.; \
310 echo "rm -f \"$${dir}/so_locations\""; \
309 echo "rm -f \"$${dir}/so_locations\""; \
311 rm -f "$${dir}/so_locations"; \
310 rm -f "$${dir}/so_locations"; \
312 done
311 done
313 librs232-@RS232_API_VERSION@.la: $(librs232_@RS232_API_VERSION@_la_OBJECTS) $(librs232_@RS232_API_VERSION@_la_DEPENDENCIES)
312 librs232-@RS232_API_VERSION@.la: $(librs232_@RS232_API_VERSION@_la_OBJECTS) $(librs232_@RS232_API_VERSION@_la_DEPENDENCIES)
314 $(librs232_@RS232_API_VERSION@_la_LINK) -rpath $(libdir) $(librs232_@RS232_API_VERSION@_la_OBJECTS) $(librs232_@RS232_API_VERSION@_la_LIBADD) $(LIBS)
313 $(librs232_@RS232_API_VERSION@_la_LINK) -rpath $(libdir) $(librs232_@RS232_API_VERSION@_la_OBJECTS) $(librs232_@RS232_API_VERSION@_la_LIBADD) $(LIBS)
315
314
316 mostlyclean-compile:
315 mostlyclean-compile:
317 -rm -f *.$(OBJEXT)
316 -rm -f *.$(OBJEXT)
318
317
319 distclean-compile:
318 distclean-compile:
320 -rm -f *.tab.c
319 -rm -f *.tab.c
321
320
322 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RS232_unix.Plo@am__quote@
321 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RS232_unix.Plo@am__quote@
323 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RS232_win.Plo@am__quote@
322 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RS232_win.Plo@am__quote@
324
323
325 .c.o:
324 .c.o:
326 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
325 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
327 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
326 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
328 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
327 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
329 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
328 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
330 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
329 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
331
330
332 .c.obj:
331 .c.obj:
333 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
332 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
334 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
333 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
335 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
334 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
336 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
335 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
337 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
336 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
338
337
339 .c.lo:
338 .c.lo:
340 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
339 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
341 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
340 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
342 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
341 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
343 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
342 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
344 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
343 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
345
344
346 mostlyclean-libtool:
345 mostlyclean-libtool:
347 -rm -f *.lo
346 -rm -f *.lo
348
347
349 clean-libtool:
348 clean-libtool:
350 -rm -rf .libs _libs
349 -rm -rf .libs _libs
351 install-pkgconfigDATA: $(pkgconfig_DATA)
350 install-pkgconfigDATA: $(pkgconfig_DATA)
352 @$(NORMAL_INSTALL)
351 @$(NORMAL_INSTALL)
353 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
352 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
354 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
353 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
355 for p in $$list; do \
354 for p in $$list; do \
356 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
355 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
357 echo "$$d$$p"; \
356 echo "$$d$$p"; \
358 done | $(am__base_list) | \
357 done | $(am__base_list) | \
359 while read files; do \
358 while read files; do \
360 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
359 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
361 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
360 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
362 done
361 done
363
362
364 uninstall-pkgconfigDATA:
363 uninstall-pkgconfigDATA:
365 @$(NORMAL_UNINSTALL)
364 @$(NORMAL_UNINSTALL)
366 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
365 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
367 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
366 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
368 test -n "$$files" || exit 0; \
367 test -n "$$files" || exit 0; \
369 echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
368 echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
370 cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
369 cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
371 install-includeHEADERS: $(include_HEADERS)
370 install-includeHEADERS: $(include_HEADERS)
372 @$(NORMAL_INSTALL)
371 @$(NORMAL_INSTALL)
373 test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
372 test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
374 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
373 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
375 for p in $$list; do \
374 for p in $$list; do \
376 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
375 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
377 echo "$$d$$p"; \
376 echo "$$d$$p"; \
378 done | $(am__base_list) | \
377 done | $(am__base_list) | \
379 while read files; do \
378 while read files; do \
380 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
379 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
381 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
380 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
382 done
381 done
383
382
384 uninstall-includeHEADERS:
383 uninstall-includeHEADERS:
385 @$(NORMAL_UNINSTALL)
384 @$(NORMAL_UNINSTALL)
386 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
385 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
387 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
386 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
388 test -n "$$files" || exit 0; \
387 test -n "$$files" || exit 0; \
389 echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
388 echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
390 cd "$(DESTDIR)$(includedir)" && rm -f $$files
389 cd "$(DESTDIR)$(includedir)" && rm -f $$files
391
390
392 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
391 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
393 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
392 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
394 unique=`for i in $$list; do \
393 unique=`for i in $$list; do \
395 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
394 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
396 done | \
395 done | \
397 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
396 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
398 END { if (nonempty) { for (i in files) print i; }; }'`; \
397 END { if (nonempty) { for (i in files) print i; }; }'`; \
399 mkid -fID $$unique
398 mkid -fID $$unique
400 tags: TAGS
399 tags: TAGS
401
400
402 TAGS: $(HEADERS) $(SOURCES) rs232config.h.in $(TAGS_DEPENDENCIES) \
401 TAGS: $(HEADERS) $(SOURCES) rs232config.h.in $(TAGS_DEPENDENCIES) \
403 $(TAGS_FILES) $(LISP)
402 $(TAGS_FILES) $(LISP)
404 set x; \
403 set x; \
405 here=`pwd`; \
404 here=`pwd`; \
406 list='$(SOURCES) $(HEADERS) rs232config.h.in $(LISP) $(TAGS_FILES)'; \
405 list='$(SOURCES) $(HEADERS) rs232config.h.in $(LISP) $(TAGS_FILES)'; \
407 unique=`for i in $$list; do \
406 unique=`for i in $$list; do \
408 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
407 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
409 done | \
408 done | \
410 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
409 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
411 END { if (nonempty) { for (i in files) print i; }; }'`; \
410 END { if (nonempty) { for (i in files) print i; }; }'`; \
412 shift; \
411 shift; \
413 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
412 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
414 test -n "$$unique" || unique=$$empty_fix; \
413 test -n "$$unique" || unique=$$empty_fix; \
415 if test $$# -gt 0; then \
414 if test $$# -gt 0; then \
416 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
415 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
417 "$$@" $$unique; \
416 "$$@" $$unique; \
418 else \
417 else \
419 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
418 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
420 $$unique; \
419 $$unique; \
421 fi; \
420 fi; \
422 fi
421 fi
423 ctags: CTAGS
422 ctags: CTAGS
424 CTAGS: $(HEADERS) $(SOURCES) rs232config.h.in $(TAGS_DEPENDENCIES) \
423 CTAGS: $(HEADERS) $(SOURCES) rs232config.h.in $(TAGS_DEPENDENCIES) \
425 $(TAGS_FILES) $(LISP)
424 $(TAGS_FILES) $(LISP)
426 list='$(SOURCES) $(HEADERS) rs232config.h.in $(LISP) $(TAGS_FILES)'; \
425 list='$(SOURCES) $(HEADERS) rs232config.h.in $(LISP) $(TAGS_FILES)'; \
427 unique=`for i in $$list; do \
426 unique=`for i in $$list; do \
428 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
427 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
429 done | \
428 done | \
430 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
429 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
431 END { if (nonempty) { for (i in files) print i; }; }'`; \
430 END { if (nonempty) { for (i in files) print i; }; }'`; \
432 test -z "$(CTAGS_ARGS)$$unique" \
431 test -z "$(CTAGS_ARGS)$$unique" \
433 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
432 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
434 $$unique
433 $$unique
435
434
436 GTAGS:
435 GTAGS:
437 here=`$(am__cd) $(top_builddir) && pwd` \
436 here=`$(am__cd) $(top_builddir) && pwd` \
438 && $(am__cd) $(top_srcdir) \
437 && $(am__cd) $(top_srcdir) \
439 && gtags -i $(GTAGS_ARGS) "$$here"
438 && gtags -i $(GTAGS_ARGS) "$$here"
440
439
441 distclean-tags:
440 distclean-tags:
442 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
441 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
443
442
444 distdir: $(DISTFILES)
443 distdir: $(DISTFILES)
445 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
444 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
446 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
445 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
447 list='$(DISTFILES)'; \
446 list='$(DISTFILES)'; \
448 dist_files=`for file in $$list; do echo $$file; done | \
447 dist_files=`for file in $$list; do echo $$file; done | \
449 sed -e "s|^$$srcdirstrip/||;t" \
448 sed -e "s|^$$srcdirstrip/||;t" \
450 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
449 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
451 case $$dist_files in \
450 case $$dist_files in \
452 */*) $(MKDIR_P) `echo "$$dist_files" | \
451 */*) $(MKDIR_P) `echo "$$dist_files" | \
453 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
452 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
454 sort -u` ;; \
453 sort -u` ;; \
455 esac; \
454 esac; \
456 for file in $$dist_files; do \
455 for file in $$dist_files; do \
457 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
456 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
458 if test -d $$d/$$file; then \
457 if test -d $$d/$$file; then \
459 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
458 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
460 if test -d "$(distdir)/$$file"; then \
459 if test -d "$(distdir)/$$file"; then \
461 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
460 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
462 fi; \
461 fi; \
463 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
462 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
464 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
463 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
465 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
464 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
466 fi; \
465 fi; \
467 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
466 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
468 else \
467 else \
469 test -f "$(distdir)/$$file" \
468 test -f "$(distdir)/$$file" \
470 || cp -p $$d/$$file "$(distdir)/$$file" \
469 || cp -p $$d/$$file "$(distdir)/$$file" \
471 || exit 1; \
470 || exit 1; \
472 fi; \
471 fi; \
473 done
472 done
474 check-am: all-am
473 check-am: all-am
475 check: check-am
474 check: check-am
476 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) rs232config.h
475 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) rs232config.h
477 installdirs:
476 installdirs:
478 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
477 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
479 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
478 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
480 done
479 done
481 install: install-am
480 install: install-am
482 install-exec: install-exec-am
481 install-exec: install-exec-am
483 install-data: install-data-am
482 install-data: install-data-am
484 uninstall: uninstall-am
483 uninstall: uninstall-am
485
484
486 install-am: all-am
485 install-am: all-am
487 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
486 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
488
487
489 installcheck: installcheck-am
488 installcheck: installcheck-am
490 install-strip:
489 install-strip:
491 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
490 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
492 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
491 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
493 `test -z '$(STRIP)' || \
492 `test -z '$(STRIP)' || \
494 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
493 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
495 mostlyclean-generic:
494 mostlyclean-generic:
496
495
497 clean-generic:
496 clean-generic:
498
497
499 distclean-generic:
498 distclean-generic:
500 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
499 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
501 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
500 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
502
501
503 maintainer-clean-generic:
502 maintainer-clean-generic:
504 @echo "This command is intended for maintainers to use"
503 @echo "This command is intended for maintainers to use"
505 @echo "it deletes files that may require special tools to rebuild."
504 @echo "it deletes files that may require special tools to rebuild."
506 clean: clean-am
505 clean: clean-am
507
506
508 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
507 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
509 mostlyclean-am
508 mostlyclean-am
510
509
511 distclean: distclean-am
510 distclean: distclean-am
512 -rm -rf ./$(DEPDIR)
511 -rm -rf ./$(DEPDIR)
513 -rm -f Makefile
512 -rm -f Makefile
514 distclean-am: clean-am distclean-compile distclean-generic \
513 distclean-am: clean-am distclean-compile distclean-generic \
515 distclean-hdr distclean-tags
514 distclean-hdr distclean-tags
516
515
517 dvi: dvi-am
516 dvi: dvi-am
518
517
519 dvi-am:
518 dvi-am:
520
519
521 html: html-am
520 html: html-am
522
521
523 html-am:
522 html-am:
524
523
525 info: info-am
524 info: info-am
526
525
527 info-am:
526 info-am:
528
527
529 install-data-am: install-includeHEADERS install-pkgconfigDATA
528 install-data-am: install-includeHEADERS install-pkgconfigDATA
530
529
531 install-dvi: install-dvi-am
530 install-dvi: install-dvi-am
532
531
533 install-dvi-am:
532 install-dvi-am:
534
533
535 install-exec-am: install-libLTLIBRARIES
534 install-exec-am: install-libLTLIBRARIES
536
535
537 install-html: install-html-am
536 install-html: install-html-am
538
537
539 install-html-am:
538 install-html-am:
540
539
541 install-info: install-info-am
540 install-info: install-info-am
542
541
543 install-info-am:
542 install-info-am:
544
543
545 install-man:
544 install-man:
546
545
547 install-pdf: install-pdf-am
546 install-pdf: install-pdf-am
548
547
549 install-pdf-am:
548 install-pdf-am:
550
549
551 install-ps: install-ps-am
550 install-ps: install-ps-am
552
551
553 install-ps-am:
552 install-ps-am:
554
553
555 installcheck-am:
554 installcheck-am:
556
555
557 maintainer-clean: maintainer-clean-am
556 maintainer-clean: maintainer-clean-am
558 -rm -rf ./$(DEPDIR)
557 -rm -rf ./$(DEPDIR)
559 -rm -f Makefile
558 -rm -f Makefile
560 maintainer-clean-am: distclean-am maintainer-clean-generic
559 maintainer-clean-am: distclean-am maintainer-clean-generic
561
560
562 mostlyclean: mostlyclean-am
561 mostlyclean: mostlyclean-am
563
562
564 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
563 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
565 mostlyclean-libtool
564 mostlyclean-libtool
566
565
567 pdf: pdf-am
566 pdf: pdf-am
568
567
569 pdf-am:
568 pdf-am:
570
569
571 ps: ps-am
570 ps: ps-am
572
571
573 ps-am:
572 ps-am:
574
573
575 uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
574 uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
576 uninstall-pkgconfigDATA
575 uninstall-pkgconfigDATA
577
576
578 .MAKE: all install-am install-strip
577 .MAKE: all install-am install-strip
579
578
580 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
579 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
581 clean-libLTLIBRARIES clean-libtool ctags distclean \
580 clean-libLTLIBRARIES clean-libtool ctags distclean \
582 distclean-compile distclean-generic distclean-hdr \
581 distclean-compile distclean-generic distclean-hdr \
583 distclean-libtool distclean-tags distdir dvi dvi-am html \
582 distclean-libtool distclean-tags distdir dvi dvi-am html \
584 html-am info info-am install install-am install-data \
583 html-am info info-am install install-am install-data \
585 install-data-am install-dvi install-dvi-am install-exec \
584 install-data-am install-dvi install-dvi-am install-exec \
586 install-exec-am install-html install-html-am \
585 install-exec-am install-html install-html-am \
587 install-includeHEADERS install-info install-info-am \
586 install-includeHEADERS install-info install-info-am \
588 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
587 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
589 install-pkgconfigDATA install-ps install-ps-am install-strip \
588 install-pkgconfigDATA install-ps install-ps-am install-strip \
590 installcheck installcheck-am installdirs maintainer-clean \
589 installcheck installcheck-am installdirs maintainer-clean \
591 maintainer-clean-generic mostlyclean mostlyclean-compile \
590 maintainer-clean-generic mostlyclean mostlyclean-compile \
592 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
591 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
593 tags uninstall uninstall-am uninstall-includeHEADERS \
592 tags uninstall uninstall-am uninstall-includeHEADERS \
594 uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
593 uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
595
594
596
595
597 # Tell versions [3.59,3.63) of GNU make to not export all variables.
596 # Tell versions [3.59,3.63) of GNU make to not export all variables.
598 # Otherwise a system limit (for SysV at least) may be exceeded.
597 # Otherwise a system limit (for SysV at least) may be exceeded.
599 .NOEXPORT:
598 .NOEXPORT:
@@ -1,34 +1,37
1 // SOPSUYSI_RS232.h
1 // SOPSUYSI_RS232.h
2
3 #define debug
4
2 #include "rs232config.h"
5 #include "rs232config.h"
3
6
4 #ifdef HAVE_WINDOWS_H
7 #ifdef HAVE_WINDOWS_H
5 #include <windows.h>
8 #include <windows.h>
6 #define badPortValue INVALID_HANDLE_VALUE
9 #define badPortValue INVALID_HANDLE_VALUE
7 typedef HANDLE rs232port_t;
10 typedef HANDLE rs232port_t;
8 typedef DWORD rs232speed_t;
11 typedef DWORD rs232speed_t;
9 typedef enum {rs232OneStop=ONESTOPBIT,rs232One5Stop=ONE5STOPBITS,rs232TwoStop=TWOSTOPBITS}rs232stop;
12 typedef enum {rs232OneStop=ONESTOPBIT,rs232One5Stop=ONE5STOPBITS,rs232TwoStop=TWOSTOPBITS}rs232stop;
10 typedef enum {rs232parityNo=NOPARITY,rs232parityOdd=ODDPARITY,rs232parityEven=EVENPARITY}rs232parity;
13 typedef enum {rs232parityNo=NOPARITY,rs232parityOdd=ODDPARITY,rs232parityEven=EVENPARITY}rs232parity;
11 #else
14 #else
12 #ifdef HAVE_TERMIOS_H
15 #ifdef HAVE_TERMIOS_H
13 #include <termios.h>
16 #include <termios.h>
14 #define badPortValue -1
17 #define badPortValue -1
15 typedef int rs232port_t;
18 typedef int rs232port_t;
16 typedef speed_t rs232speed_t;
19 typedef speed_t rs232speed_t;
17 typedef enum {rs232OneStop=1,rs232One5Stop=2,rs232TwoStop=2}rs232stop;
20 typedef enum {rs232OneStop=1,rs232One5Stop=2,rs232TwoStop=2}rs232stop;
18 typedef enum {rs232parityNo=(~PARENB),rs232parityOdd=(PARENB|PARODD),rs232parityEven=(PARENB|~PARODD)}rs232parity;
21 typedef enum {rs232parityNo=(~PARENB),rs232parityOdd=(PARENB|PARODD),rs232parityEven=(PARENB|~PARODD)}rs232parity;
19 #endif
22 #endif
20 #endif
23 #endif
21 #ifdef __cplusplus
24 #ifdef __cplusplus
22 #define rs232extern extern "C"
25 #define rs232extern extern "C"
23 #else
26 #else
24 #define rs232extern extern
27 #define rs232extern extern
25 #endif
28 #endif
26 rs232extern rs232port_t rs232open(char* psPortName);
29 rs232extern rs232port_t rs232open(char* psPortName);
27 rs232extern int rs232close(rs232port_t fd);
30 rs232extern int rs232close(rs232port_t fd);
28 rs232extern int rs232setup(rs232port_t fd, int ChSize, int BaudeRate, rs232parity Parity, rs232stop NbStop);
31 rs232extern int rs232setup(rs232port_t fd, int ChSize, int BaudeRate, rs232parity Parity, rs232stop NbStop);
29 rs232extern int rs232write(rs232port_t fd,char *psWrite, int WriteBufferSize);
32 rs232extern int rs232write(rs232port_t fd,char *psWrite, int WriteBufferSize);
30 rs232extern int rs232read(rs232port_t fd,char *psRead, int ReadBufferSize);
33 rs232extern int rs232read(rs232port_t fd,char *psRead, int ReadBufferSize);
31 rs232extern int rs232setparity(rs232port_t fd, rs232parity Parity);
34 rs232extern int rs232setparity(rs232port_t fd, rs232parity Parity);
32 rs232extern int rs232setnbstop(rs232port_t fd, rs232stop NbStop);
35 rs232extern int rs232setnbstop(rs232port_t fd, rs232stop NbStop);
33 rs232extern int rs232setcsize(rs232port_t fd, int ChSize);
36 rs232extern int rs232setcsize(rs232port_t fd, int ChSize);
34 rs232extern int rs232setbaudrate(rs232port_t fd, int baudrate);
37 rs232extern int rs232setbaudrate(rs232port_t fd, int baudrate);
@@ -1,299 +1,339
1 #include <stdio.h>
1 #include <stdio.h>
2 #include <unistd.h>
2 #include <unistd.h>
3 #include <fcntl.h>
3 #include <fcntl.h>
4 #include <string.h>
4 #include <string.h>
5 #include <errno.h>
5 #include <errno.h>
6 #include "rs232config.h"
6 #include "rs232config.h"
7 #ifdef HAVE_TERMIOS_H
7 #ifdef HAVE_TERMIOS_H
8 #include <termios.h>
8 #include <termios.h>
9 #endif
9 #endif
10 #include "RS232.h"
10 #include "RS232.h"
11
11
12 #ifdef HAVE_WINDOWS_H
12 #ifdef HAVE_WINDOWS_H
13 #else
13 #else
14 #ifdef HAVE_TERMIOS_H
14 #ifdef HAVE_TERMIOS_H
15 rs232speed_t rs232cfspeed(unsigned int BaudeRate);
15 rs232speed_t rs232cfspeed(unsigned int BaudeRate);
16
16
17 rs232port_t rs232open(char* psPortName)
17 rs232port_t rs232open(char* psPortName)
18 {
18 {
19 rs232port_t fd;
19 rs232port_t fd;
20 fd = open(psPortName, O_RDWR | O_NOCTTY | O_NDELAY);
20 fd = open(psPortName, O_RDWR | O_NOCTTY | O_NDELAY);
21 #ifdef debug
22 if(fd==-1)printf("can't open Port\n");
23 #endif
21 return fd;
24 return fd;
22 }
25 }
23
26
24 int rs232close(rs232port_t fd)
27 int rs232close(rs232port_t fd)
25 {
28 {
26 if ((int)fd == -1)
29 if ((int)fd == -1)
27 {
30 {
28 return -1;
31 return -1;
29 }
32 }
30 else
33 else
31 {
34 {
32 close(fd);
35 close(fd);
33 return 0;
36 return 0;
34 }
37 }
35 }
38 }
36
39
37
40
38 int rs232setup(rs232port_t fd, int ChSize, int BaudeRate, rs232parity Parity, rs232stop NbStop)
41 int rs232setup(rs232port_t fd, int ChSize, int BaudeRate, rs232parity Parity, rs232stop NbStop)
39 {
42 {
40 if ((int)fd == -1)
43 if ((int)fd == -1)
41 {
44 {
42 return -1;
45 return -1;
43 }
46 }
44 else
47 else
45 {
48 {
46 struct termios terminos;
49 struct termios terminos;
47 tcgetattr(fd, &terminos);
50 tcgetattr(fd, &terminos);
48 cfsetispeed(&terminos, rs232cfspeed(BaudeRate));
51 cfsetispeed(&terminos, rs232cfspeed(BaudeRate));
49 cfsetospeed(&terminos, rs232cfspeed(BaudeRate));
52 cfsetospeed(&terminos, rs232cfspeed(BaudeRate));
50 terminos.c_cflag |= (CLOCAL | CREAD);
53 terminos.c_cflag |= (CLOCAL | CREAD);
51 rs232cfparity(fd, &terminos, Parity);
54 rs232cfparity(fd, &terminos, Parity);
52 rs232cfnbstop(fd, &terminos, NbStop);
55 rs232cfnbstop(fd, &terminos, NbStop);
53 rs232cfcsize(fd, &terminos, ChSize);
56 rs232cfcsize(fd, &terminos, ChSize);
54 tcsetattr(fd, TCSANOW, &terminos);
57
58 #ifdef debug
59 if(tcsetattr(fd, TCSANOW, &terminos)!=0)printf("bad setup\n");
60 #else
61 tcsetattr(fd, TCSANOW, &terminos);
62 #endif
55 return 0;
63 return 0;
56 }
64 }
57 }
65 }
58
66
59 int rs232setbaudrate(rs232port_t fd, int baudrate)
67 int rs232setbaudrate(rs232port_t fd, int baudrate)
60 {
68 {
61 if ((int)fd == -1)
69 if ((int)fd == -1)
62 {
70 {
63 return fd;
71 return fd;
64 }
72 }
65 else
73 else
66 {
74 {
67 struct termios terminos;
75 struct termios terminos;
68 tcgetattr(fd, &terminos);
76 tcgetattr(fd, &terminos);
69 cfsetispeed(&terminos, rs232cfspeed(baudrate));
77 cfsetispeed(&terminos, rs232cfspeed(baudrate));
70 cfsetospeed(&terminos, rs232cfspeed(baudrate));
78 cfsetospeed(&terminos, rs232cfspeed(baudrate));
71 tcsetattr(fd, TCSANOW, &terminos);
79 tcsetattr(fd, TCSANOW, &terminos);
72 return 0;
80 return 0;
73 }
81 }
74 }
82 }
75
83
76 int rs232setparity(rs232port_t fd, rs232parity Parity)
84 int rs232setparity(rs232port_t fd, rs232parity Parity)
77 {
85 {
78 if ((int)fd == -1)
86 if ((int)fd == -1)
79 {
87 {
80 return fd;
88 return fd;
81 }
89 }
82 else
90 else
83 {
91 {
84 struct termios terminos;
92 struct termios terminos;
85 tcgetattr(fd, &terminos);
93 tcgetattr(fd, &terminos);
86 terminos.c_cflag = Parity;
94 switch(Parity)
95 {
96 case rs232parityNo:
97 terminos.c_cflag &= Parity;
98 break;
99 case rs232parityOdd:
100 terminos.c_cflag &= ~PARENB;
101 terminos.c_cflag |= Parity;
102 break;
103 case rs232parityEven:
104 terminos.c_cflag &= ~PARENB;
105 terminos.c_cflag |= Parity;
106 break;
107 default:
108 terminos.c_cflag &= ~PARENB;
109 break;
110 }
87 tcsetattr(fd, TCSANOW, &terminos);
111 tcsetattr(fd, TCSANOW, &terminos);
88 return 0;
112 return 0;
89 }
113 }
90 }
114 }
91
115
92 int rs232setnbstop(rs232port_t fd, rs232stop NbStop)
116 int rs232setnbstop(rs232port_t fd, rs232stop NbStop)
93 {
117 {
94 if ((int)fd == -1)
118 if ((int)fd == -1)
95 {
119 {
96 return fd;
120 return fd;
97 }
121 }
98 else
122 else
99 {
123 {
100 struct termios terminos;
124 struct termios terminos;
101 tcgetattr(fd, &terminos);
125 tcgetattr(fd, &terminos);
102 switch(NbStop)
126 switch(NbStop)
103 {
127 {
104 case 2:
128 case 2:
105 terminos.c_cflag |= CSTOPB;
129 terminos.c_cflag |= CSTOPB;
106 break;
130 break;
107 default:
131 default:
108 terminos.c_cflag &= ~CSTOPB;
132 terminos.c_cflag &= ~CSTOPB;
109 break;
133 break;
110 }
134 }
111 tcsetattr(fd, TCSANOW, &terminos);
135 tcsetattr(fd, TCSANOW, &terminos);
112 return 0;
136 return 0;
113 }
137 }
114 }
138 }
115
139
116
140
117 int rs232setcsize(rs232port_t fd, int ChSize)
141 int rs232setcsize(rs232port_t fd, int ChSize)
118 {
142 {
119 if ((int)fd == -1)
143 if ((int)fd == -1)
120 {
144 {
121 return fd;
145 return fd;
122 }
146 }
123 else
147 else
124 {
148 {
125 struct termios terminos;
149 struct termios terminos;
126 tcgetattr(fd, &terminos);
150 tcgetattr(fd, &terminos);
127 switch(ChSize)
151 switch(ChSize)
128 {
152 {
129 case 5:
153 case 5:
130 terminos.c_cflag |= CS5;
154 terminos.c_cflag |= CS5;
131 break;
155 break;
132 case 6:
156 case 6:
133 terminos.c_cflag |= CS6;
157 terminos.c_cflag |= CS6;
134 break;
158 break;
135 case 7:
159 case 7:
136 terminos.c_cflag |= CS7;
160 terminos.c_cflag |= CS7;
137 break;
161 break;
138 default:
162 default:
139 terminos.c_cflag |= CS8;
163 terminos.c_cflag |= CS8;
140 break;
164 break;
141 }
165 }
142 tcsetattr(fd, TCSANOW, &terminos);
166 tcsetattr(fd, TCSANOW, &terminos);
143 return 0;
167 return 0;
144 }
168 }
145 }
169 }
146
170
147 rs232speed_t rs232cfspeed(unsigned int BaudeRate)
171 rs232speed_t rs232cfspeed(unsigned int BaudeRate)
148 {
172 {
149 if(BaudeRate<25)
173 if(BaudeRate<25)
150 return B0;
174 return B0;
151
175
152 if(BaudeRate<67)
176 if(BaudeRate<67)
153 return B50;
177 return B50;
154
178
155 if(BaudeRate<93)
179 if(BaudeRate<93)
156 return B75;
180 return B75;
157
181
158 if(BaudeRate<123)
182 if(BaudeRate<123)
159 return B110;
183 return B110;
160
184
161 if(BaudeRate<142)
185 if(BaudeRate<142)
162 return B134;
186 return B134;
163
187
164 if(BaudeRate<175)
188 if(BaudeRate<175)
165 return B150;
189 return B150;
166
190
167 if(BaudeRate<250)
191 if(BaudeRate<250)
168 return B200;
192 return B200;
169
193
170 if(BaudeRate<450)
194 if(BaudeRate<450)
171 return B300;
195 return B300;
172
196
173 if(BaudeRate<900)
197 if(BaudeRate<900)
174 return B600;
198 return B600;
175
199
176 if(BaudeRate<1500)
200 if(BaudeRate<1500)
177 return B1200;
201 return B1200;
178
202
179 if(BaudeRate<2100)
203 if(BaudeRate<2100)
180 return B1800;
204 return B1800;
181
205
182 if(BaudeRate<3600)
206 if(BaudeRate<3600)
183 return B2400;
207 return B2400;
184
208
185 if(BaudeRate<7200)
209 if(BaudeRate<7200)
186 return B4800;
210 return B4800;
187
211
188 if(BaudeRate<1400)
212 if(BaudeRate<1400)
189 return B9600;
213 return B9600;
190
214
191 if(BaudeRate<28800)
215 if(BaudeRate<28800)
192 return B19200;
216 return B19200;
193
217
194 if(BaudeRate<48000)
218 if(BaudeRate<48000)
195 return B38400;
219 return B38400;
196
220
197 if(BaudeRate<86400)
221 if(BaudeRate<86400)
198 return B57600;
222 return B57600;
199
223
200 if(BaudeRate<172800)
224 if(BaudeRate<172800)
201 return B115200;
225 return B115200;
202 else
226 else
203 return B230400;
227 return B230400;
204 }
228 }
205
229
206
230
207 int rs232cfparity(int fd, struct termios *terminos, rs232parity Parity)
231 int rs232cfparity(int fd, struct termios *terminos, rs232parity Parity)
208 {
232 {
209 if ((int)fd == -1)
233 if ((int)fd == -1)
210 {
234 {
211 return fd;
235 return fd;
212 }
236 }
213 else
237 else
214 {
238 {
215 terminos->c_cflag = Parity;
239 switch(Parity)
240 {
241 case rs232parityNo:
242 terminos->c_cflag &= Parity;
243 break;
244 case rs232parityOdd:
245 terminos->c_cflag &= ~PARENB;
246 terminos->c_cflag |= Parity;
247 break;
248 case rs232parityEven:
249 terminos->c_cflag &= ~PARENB;
250 terminos->c_cflag |= Parity;
251 break;
252 default:
253 terminos->c_cflag &= ~PARENB;
254 break;
255 }
216 return 0;
256 return 0;
217 }
257 }
218 }
258 }
219
259
220 int rs232cfnbstop(int fd, struct termios *terminos, rs232stop NbStop)
260 int rs232cfnbstop(int fd, struct termios *terminos, rs232stop NbStop)
221 {
261 {
222 if ((int)fd == -1)
262 if ((int)fd == -1)
223 {
263 {
224 return fd;
264 return fd;
225 }
265 }
226 else
266 else
227 {
267 {
228 switch(NbStop)
268 switch(NbStop)
229 {
269 {
230 case 2:
270 case 2:
231 terminos->c_cflag |= CSTOPB;
271 terminos->c_cflag |= CSTOPB;
232 break;
272 break;
233 default:
273 default:
234 terminos->c_cflag &= ~CSTOPB;
274 terminos->c_cflag &= ~CSTOPB;
235 break;
275 break;
236 }
276 }
237 return 0;
277 return 0;
238 }
278 }
239 }
279 }
240
280
241
281
242 int rs232cfcsize(int fd, struct termios *terminos, int ChSize)
282 int rs232cfcsize(int fd, struct termios *terminos, int ChSize)
243 {
283 {
244 if ((int)fd == -1)
284 if ((int)fd == -1)
245 {
285 {
246 return fd;
286 return fd;
247 }
287 }
248 else
288 else
249 {
289 {
250 switch(ChSize)
290 switch(ChSize)
251 {
291 {
252 case 5:
292 case 5:
253 terminos->c_cflag |= CS5;
293 terminos->c_cflag |= CS5;
254 break;
294 break;
255 case 6:
295 case 6:
256 terminos->c_cflag |= CS6;
296 terminos->c_cflag |= CS6;
257 break;
297 break;
258 case 7:
298 case 7:
259 terminos->c_cflag |= CS7;
299 terminos->c_cflag |= CS7;
260 break;
300 break;
261 default:
301 default:
262 terminos->c_cflag |= CS8;
302 terminos->c_cflag |= CS8;
263 break;
303 break;
264 }
304 }
265 return 0;
305 return 0;
266 }
306 }
267 }
307 }
268
308
269
309
270 int rs232write(rs232port_t fd,char *psWrite, int WriteBufferSize)
310 int rs232write(rs232port_t fd,char *psWrite, int WriteBufferSize)
271 {
311 {
272 if ((int)fd == -1)
312 if ((int)fd == -1)
273 {
313 {
274 return -1;
314 return -1;
275 }
315 }
276 else
316 else
277 {
317 {
278 return write(fd, psWrite, WriteBufferSize);
318 return write(fd, psWrite, WriteBufferSize);
279 }
319 }
280 }
320 }
281
321
282
322
283 int rs232read(rs232port_t fd,char *psReadHex, int ReadBufferSize)
323 int rs232read(rs232port_t fd,char *psReadHex, int ReadBufferSize)
284 {
324 {
285
325
286 if ((int)fd == -1)
326 if ((int)fd == -1)
287 {
327 {
288 return -1;
328 return -1;
289 }
329 }
290 else
330 else
291 {
331 {
292 return read(fd, psReadHex, ReadBufferSize);
332 return read(fd, psReadHex, ReadBufferSize);
293 }
333 }
294
334
295 }
335 }
296
336
297 #endif
337 #endif
298 #endif //#ifdef HAVE_TERMIOS_H
338 #endif //#ifdef HAVE_TERMIOS_H
299
339
General Comments 0
You need to be logged in to leave comments. Login now