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