This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile.macosx
476 lines (421 loc) · 17.3 KB
/
Makefile.macosx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# We are having problems with GNU tools generating good Makefiles. Here
# Is a Makefile that works for Joseph.
# Generated automatically from Makefile.in by configure.
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
###########################################################################
# RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
# RXTX is a native interface to serial ports in java.
# Copyright 1997-2007 by Trent Jarvi [email protected] and others who
# actually wrote it. See individual source files for more information.
#
# A copy of the LGPL v 2.1 may be found at
# http://www.gnu.org/licenses/lgpl.txt on March 4th 2007. A copy is
# here for your convenience.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# An executable that contains no derivative of any portion of RXTX, but
# is designed to work with RXTX by being dynamically linked with it,
# is considered a "work that uses the Library" subject to the terms and
# conditions of the GNU Lesser General Public License.
#
# The following has been added to the RXTX License to remove
# any confusion about linking to RXTX. We want to allow in part what
# section 5, paragraph 2 of the LGPL does not permit in the special
# case of linking over a controlled interface. The intent is to add a
# Java Specification Request or standards body defined interface in the
# future as another exception but one is not currently available.
#
# http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
#
# As a special exception, the copyright holders of RXTX give you
# permission to link RXTX with independent modules that communicate with
# RXTX solely through the Sun Microsytems CommAPI interface version 2,
# regardless of the license terms of these independent modules, and to copy
# and distribute the resulting combined work under terms of your choice,
# provided that every copy of the combined work is accompanied by a complete
# copy of the source code of RXTX (the version of RXTX used to produce the
# combined work), being distributed under the terms of the GNU Lesser General
# Public License plus this exception. An independent module is a
# module which is not derived from or based on RXTX.
#
# Note that people who make modified versions of RXTX are not obligated
# to grant this special exception for their modified versions; it is
# their choice whether to do so. The GNU Lesser General Public License
# gives permission to release a modified version without this exception; this
# exception also makes it possible to release a modified version which
# carries forward this exception.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# All trademarks belong to their respective owners.
############################################################################
SHELL = /bin/sh
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/Serial
pkglibdir = $(libdir)/Serial
pkgincludedir = $(includedir)/Serial
top_builddir = .
ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOMAKE = automake
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = powerpc-apple-darwin1.3.7
build_triplet = powerpc-apple-darwin1.3.7
host_alias = powerpc-apple-darwin1.3.7
host_triplet = powerpc-apple-darwin1.3.7
target_alias = powerpc-apple-darwin1.3.7
target_triplet = powerpc-apple-darwin1.3.7
AS = @AS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = cc
CFLAGS = -g -O2 -D_BSD_SOURCE -bundle
CLASSPATH = -classpath .:$(TOP):$(TOP)/src:$(JPATH)/lib/ext/RXTXcomm.jar:.:
DATADIRNAME = @DATADIRNAME@
DLLTOOL = @DLLTOOL@
EXTENSION = c
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
JAR = $(JPATH)/bin/jar
JAVAC = $(JPATH)/bin/javac $(CLASSPATH) -d $(TOP)/ -O
JAVADOC = $(JPATH)/bin/javadoc
JAVAH = $(JPATH)/bin/javah $(CLASSPATH) -d $(DEST) -jni
JAVAH_FIX =
JAVAINCLUDE = -I $(JAVAINCLUDEDIR)
JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Home/../../../Headers
JAVANATINC = -I $(JAVAINCLUDEDIR)/./
JAVA_CLASS_PATH =
JAVA_CLASS_VERSION =
JAVA_HOME =
JAVA_LIBRARY_PATH =
JAVA_VENDOR = Apple Computer, Inc.
JAVA_VERSION = 1.3.1
JHOME = /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Home/lib/ext
JPATH = /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Home
LDFLAG =
LDFLAGS = -module -framework JavaVM -framework IOKit -framework CoreFoundation
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBTOOL_FIX = sed s/echo\ so/echo\ jnilib/g libtool > tmp; mv tmp libtool; chmod +x libtool;
LN_S = ln -s
MAKEINFO = /Volumes/Medon/Personal/joseph/Developer/RXTX/rxtx-1.5/merged/missing makeinfo
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OS_ARCH = ppc
OS_NAME = Mac OS X
OS_VERSION = 1.3.7
PACKAGE = Serial
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = ranlib
RXTX_PATH = /usr/lib/java
TARGETLIB = $(target_alias)/librxtxSerial.la
THREAD_FLAG =
TOP = /Volumes/Medon/Personal/joseph/Developer/RXTX/rxtx-1.5/merged
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = 1.2.10
WINDOWS_JAVA_INCLUDE =
l = @l@
srcdir = .
AUTOMAKE_OPTIONS = foreign
INCLUDES = -I $(TOP) -I $(DEST) -I . $(JAVAINCLUDE) $(JAVANATINC)
####################### vars for rxtx-1.4->1.5 transition
JARTARGET = RXTXcomm.jar
CLASSDIR = gnu.io
CLASSTOP = gnu
CLASSDEST = gnu/io
####################### tools
LIBTOOLC = $(TOP)/libtool --mode=compile $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(VERBOSE_IOEXCEPTIONS) -c
LIBTOOL_INST = $(TOP)/libtool --mode=install $(INSTALL_PROGRAM)
LINK = $(TOP)/libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -version-info 1:0:1
####################### dirs
SPATH = $(srcdir)/src
DEST = $(target_alias)
####################### rules
CLASSES = $(patsubst $(SPATH)/%.java,$(TOP)/$(CLASSDEST)/%.class,$(wildcard $(SPATH)/*.java))
javafiles = $(wildcard $(SPATH)/*.java)
javahfiles = $(patsubst $(SPATH)/%.java,%,$(wildcard $(SPATH)/*.java))
#######################
CLEANFILES = $(TOP)/*.class $(TOP)/$(CLASSDEST)/*.class $(TOP)/$(JARTARGET)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in TODO acconfig.h acinclude.m4 aclocal.m4 \
config.guess config.h.in config.sub configure configure.in install-sh \
ltconfig ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gnutar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
tags: TAGS
TAGS:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile config.h
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
mostlyclean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-hdr clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-hdr distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
-rm -f config.status
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
tags distdir info-am info dvi-am dvi check check-am installcheck-am \
installcheck all-recursive-am install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# compile src/SerialImp.c and similar files into libraries.
# LIBTOOL_FIX handles problems encountered on some OS's. See configure.in
# If a LIBTOOL_FIX is added be sure to provide a trailing ';' in configure.in
# The stuff below tries to do this without running into the link problems
# $(LINK) -o lib$*.la -rpath $(RXTX_PATH) \
# $(TOP)/$(DEST)/$*Imp.lo $(TOP)/$(DEST)/fuserImp.lo; \
$(target_alias)/lib%.la: $(SPATH)/%Imp.c $(CLASSES) $(SPATH)/%Imp.h
@( \
$(LIBTOOL_FIX) \
cd $(DEST); \
touch it1; \
$(LIBTOOLC) ../$(SPATH)/$*Imp.c -o $(TOP)/$(DEST)/$*Imp.lo; \
touch it2; \
if [ "$*" = "rxtxSerial" ]; then \
$(LIBTOOLC) ../$(SPATH)/fuserImp.c \
-o $(TOP)/$(DEST)/fuserImp.lo; \
mkdir -p $(TOP)/$(DEST)/.libs; \
cc -bundle -undefined warning \
-o .libs/librxtxSerial.jnilib \
$(TOP)/$(DEST)/SerialImp.lo \
$(TOP)/$(DEST)/fuserImp.lo \
-framework JavaVM -framework IOKit; \
echo "# librxtxSerial.la - a libtool library file" > $(TOP)/$(DEST)/librxtxSerial.la; \
echo "# librxtxSerial.la - a libtool library file" > $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "# Generated by ltmain.sh - GNU libtool 1.3.5 (1.3 2000/11/22 00:47:10)" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "# Generated by ltmain.sh - GNU libtool 1.3.5 (1.3 2000/11/22 00:47:10)" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "dlname='librxtxSerial.jnilib'" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "dlname='librxtxSerial.jnilib'" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "library_names='librxtxSerial.jnilib'" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "library_names='librxtxSerial.jnilib'" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "old_library=''" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "old_library=''" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "dependency_libs=''" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "dependency_libs=''" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "current=1" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "current=1" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "age=1" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "age=1" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "revision=0" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "revision=0" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "installed=yes" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "installed=yes" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
echo "libdir='/usr/lib/java'" >> $(TOP)/$(DEST)/librxtxSerial.la; \
echo "libdir='/usr/lib/java'" >> $(TOP)/$(DEST)/.libs/librxtxSerial.lai; \
(cd .libs && rm -f librxtxSerial.la && ln -s ../librxtxSerial.la librxtxSerial.la); \
else \
$(LINK) -o lib$*.la -rpath $(RXTX_PATH) \
$(TOP)/$(DEST)/$*Imp.lo $(FUSER); \
fi; \
)
# compile src/RXTXPort.java and similar files into classes
# then create the .jar file
$(CLASSES): $(javafiles) $(TOP)/Makefile
$(JAVAH_FIX)
$(JAVAC) $(javafiles)
@$(JAVAH) `(for i in $(javahfiles);do \
if grep -q native.*\( $(SPATH)/$$i.java; then \
echo $(CLASSDIR).$$i; \
fi; \
done)`
$(JAR) cf $(JARTARGET) $(CLASSTOP)/*
# install libSerial.so into the proper directory and copy $(JARTARGET) to its
# proper location
install: all
@$(LIBTOOL_INST) \
`for i in $(TARGETLIB);do \
if [ -f $$i ];then \
echo $$i; \
fi; \
done` $(RXTX_PATH)
$(INSTALL_PROGRAM) $(JARTARGET) $(JHOME)/
clean-generic:
rm -rf $(DEST) $(TOP)/$(CLASSTOP)
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
all: $(TARGETLIB)
# create the javadoc files.
docs: $(CLASSES)
$(JAVADOC) $(javafiles)