Makefile.am 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649
  1. ## Process this file with automake to produce Makefile.in.
  2. AUTOMAKE_OPTIONS = foreign subdir-objects
  3. ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
  4. # May be used by various substitution variables.
  5. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
  6. export gcc_version
  7. SUBDIRS = $(DIRLTDL) gcj include classpath
  8. if TESTSUBDIR
  9. SUBDIRS += testsuite
  10. endif
  11. # write_entries_to_file - writes each entry in a list
  12. # to the specified file. Entries are written in chunks of
  13. # $(write_entries_to_file_split) to accomodate systems with
  14. # severe command-line-length limitations.
  15. # Parameters:
  16. # $(1): variable containing entries to iterate over
  17. # $(2): output file
  18. write_entries_to_file_split = 50
  19. write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
  20. $(foreach range, \
  21. $(shell i=1; while test $$i -le $(words $(1)); do \
  22. echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
  23. $(shell echo $(wordlist $(range), \
  24. $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \
  25. | tr ' ' '\012' >> $(2)))
  26. ## ################################################################
  27. # autoconf2.13's target_alias
  28. target_noncanonical = @target_noncanonical@
  29. # This is required by TL_AC_GXX_INCLUDE_DIR.
  30. libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
  31. libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
  32. ##
  33. ## What gets installed, and where.
  34. ##
  35. toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la
  36. toolexecmainlib_DATA = libgcj.spec
  37. ##
  38. ## These files form a closed dependency group at the lower
  39. ## edge of libjava's dependency graph, so can be separated out.
  40. ## For details of how the list was generated, see the GCC wiki:
  41. ##
  42. ## http://gcc.gnu.org/wiki/Internal_dependencies_of_libgcj
  43. ##
  44. LOWER_PACKAGE_FILES_LO = \
  45. $(propertyo_files) \
  46. gnu-CORBA.lo \
  47. gnu-java-awt-dnd-peer-gtk.lo \
  48. gnu-java-awt-peer-gtk.lo \
  49. gnu-java-awt-peer-swing.lo \
  50. gnu-java-lang-management.lo \
  51. gnu-javax-management.lo \
  52. gnu-javax-rmi.lo \
  53. gnu-javax-sound-midi.lo \
  54. gnu-xml-aelfred2.lo \
  55. gnu-xml-dom.lo \
  56. gnu-xml-libxmlj.lo \
  57. gnu-xml-pipeline.lo \
  58. gnu-xml-stream.lo \
  59. gnu-xml-transform.lo \
  60. gnu-xml-util.lo \
  61. gnu-xml-validation.lo \
  62. gnu-xml-xpath.lo \
  63. java-lang-management.lo \
  64. javax-imageio.lo \
  65. javax-rmi.lo \
  66. jni-libjvm.lo \
  67. org-omg-CORBA.lo \
  68. org-omg-CORBA_2_3.lo \
  69. org-omg-CosNaming.lo \
  70. org-omg-Dynamic.lo \
  71. org-omg-DynamicAny.lo \
  72. org-omg-IOP.lo \
  73. org-omg-Messaging.lo \
  74. org-omg-PortableInterceptor.lo \
  75. org-omg-PortableServer.lo \
  76. org-omg-SendingContext.lo \
  77. org-omg-stub.lo \
  78. org-relaxng.lo \
  79. org-xml.lo \
  80. META-INF/services/java.util.prefs.PreferencesFactory.in.lo \
  81. META-INF/services/java.util.prefs.PreferencesFactory.lo \
  82. META-INF/services/javax.sound.midi.spi.MidiDeviceProvider.lo \
  83. META-INF/services/javax.sound.midi.spi.MidiFileReader.lo \
  84. META-INF/services/javax.sound.midi.spi.MidiFileWriter.lo \
  85. META-INF/services/javax.sound.sampled.spi.AudioFileReader.lo \
  86. classpath/native/jni/classpath/jcl.lo \
  87. classpath/native/jni/classpath/jnilink.lo \
  88. classpath/native/jni/java-math/gnu_java_math_GMP.lo \
  89. classpath/tools/libgcj_tools_la-tools.lo \
  90. gnu/awt.lo \
  91. gnu/awt/j2d.lo \
  92. gnu/gcj/io.lo \
  93. gnu/gcj/io/natSimpleSHSStream.lo \
  94. gnu/gcj/io/shs.lo \
  95. gnu/gcj/tools/gcj_dbtool.lo \
  96. gnu/gcj/util/natDebug.lo \
  97. gnu/gcj/util/natGCInfo.lo \
  98. gnu/java/awt/dnd.lo \
  99. gnu/java/awt/font.lo \
  100. gnu/java/awt/image.lo \
  101. gnu/java/awt/print.lo \
  102. gnu/java/awt/font/autofit.lo \
  103. gnu/java/awt/font/opentype.lo \
  104. gnu/java/awt/font/opentype/truetype.lo \
  105. gnu/java/lang/management/natVMClassLoadingMXBeanImpl.lo \
  106. gnu/java/lang/management/natVMCompilationMXBeanImpl.lo \
  107. gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.lo \
  108. gnu/java/lang/management/natVMMemoryMXBeanImpl.lo \
  109. gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.lo \
  110. gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.lo \
  111. gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.lo \
  112. gnu/java/lang/management/natVMRuntimeMXBeanImpl.lo \
  113. gnu/java/lang/management/natVMThreadMXBeanImpl.lo \
  114. gnu/java/net/local.lo \
  115. gnu/java/net/protocol/ftp.lo \
  116. gnu/java/net/protocol/gcjlib.lo \
  117. gnu/java/net/protocol/https.lo \
  118. gnu/javax/imageio.lo \
  119. gnu/javax/print.lo \
  120. gnu/javax/sound.lo \
  121. gnu/javax/activation/viewers.lo \
  122. gnu/javax/imageio/bmp.lo \
  123. gnu/javax/imageio/gif.lo \
  124. gnu/javax/imageio/jpeg.lo \
  125. gnu/javax/imageio/png.lo \
  126. gnu/javax/naming/giop.lo \
  127. gnu/javax/naming/ictxImpl/trans.lo \
  128. gnu/javax/naming/jndi/url/corbaname.lo \
  129. gnu/javax/naming/jndi/url/rmi.lo \
  130. gnu/javax/print/ipp.lo \
  131. gnu/javax/print/ipp/attribute.lo \
  132. gnu/javax/print/ipp/attribute/defaults.lo \
  133. gnu/javax/print/ipp/attribute/job.lo \
  134. gnu/javax/print/ipp/attribute/printer.lo \
  135. gnu/javax/print/ipp/attribute/supported.lo \
  136. gnu/javax/security/auth/login.lo \
  137. gnu/javax/sound/sampled/AU.lo \
  138. gnu/javax/sound/sampled/WAV.lo \
  139. gnu/javax/swing/plaf/gnu.lo \
  140. gnu/javax/swing/plaf/metal.lo \
  141. java/sql.lo \
  142. java/awt/im.lo \
  143. java/awt/print.lo \
  144. java/awt/im/spi.lo \
  145. java/security/acl.lo \
  146. javax/activation.lo \
  147. javax/activity.lo \
  148. javax/management.lo \
  149. javax/naming.lo \
  150. javax/print.lo \
  151. javax/sql.lo \
  152. javax/tools.lo \
  153. javax/transaction.lo \
  154. javax/management/loading.lo \
  155. javax/management/openmbean.lo \
  156. javax/management/remote.lo \
  157. javax/management/remote/rmi.lo \
  158. javax/naming/directory.lo \
  159. javax/naming/event.lo \
  160. javax/naming/ldap.lo \
  161. javax/naming/spi.lo \
  162. javax/print/attribute.lo \
  163. javax/print/event.lo \
  164. javax/print/attribute/standard.lo \
  165. javax/security/cert.lo \
  166. javax/security/auth/kerberos.lo \
  167. javax/security/auth/login.lo \
  168. javax/security/auth/spi.lo \
  169. javax/sound/midi.lo \
  170. javax/sound/midi/spi.lo \
  171. javax/swing/plaf/multi.lo \
  172. javax/swing/plaf/synth.lo \
  173. javax/swing/text/rtf.lo \
  174. javax/swing/text/html/default.css.lo \
  175. javax/transaction/xa.lo \
  176. org/ietf/jgss.lo \
  177. sun/awt.lo
  178. ##
  179. ## Lists of all .lo files, and filtered core and non-core lists.
  180. ##
  181. ALL_PACKAGE_SOURCE_FILES_LO = $(all_packages_source_files:.list=.lo) $(propertyo_files) $(bc_objects)
  182. NONCORE_PACKAGE_SOURCE_FILES_LO = $(filter $(LOWER_PACKAGE_FILES_LO),$(ALL_PACKAGE_SOURCE_FILES_LO))
  183. CORE_PACKAGE_SOURCE_FILES_LO = $(filter-out $(LOWER_PACKAGE_FILES_LO),$(ALL_PACKAGE_SOURCE_FILES_LO))
  184. ##
  185. ## Assign objects to output libraries.
  186. ##
  187. if BUILD_SUBLIBS
  188. toolexeclib_LTLIBRARIES += libgcj-noncore.la
  189. libgcj_noncore_la_LIBADD_SUBOBJECTS = $(NONCORE_PACKAGE_SOURCE_FILES_LO)
  190. libgcj_la_LIBADD_SUBOBJECTS = $(CORE_PACKAGE_SOURCE_FILES_LO)
  191. LIBJAVA_LDFLAGS_NOUNDEF = $(LIBGCJ_SUBLIB_LTFLAGS)
  192. LIBJAVA_CORE_EXTRA = @LIBGCJ_SUBLIB_CORE_EXTRA_DEPS@
  193. else
  194. # If not building sublibraries, everything goes in libgcj,
  195. # and it cannot be usefully built shared on PE platforms.
  196. libgcj_la_LIBADD_SUBOBJECTS = $(ALL_PACKAGE_SOURCE_FILES_LO)
  197. LIBJAVA_LDFLAGS_NOUNDEF =
  198. LIBJAVA_CORE_EXTRA =
  199. endif
  200. if USE_LIBGCJ_BC
  201. toolexeclib_LTLIBRARIES += install/libgcj_bc.la
  202. noinst_LTLIBRARIES = libgcj_bc.la
  203. endif
  204. if XLIB_AWT
  205. toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
  206. endif
  207. dbexec_LTLIBRARIES = libjvm.la
  208. pkgconfigdir = $(toolexeclibdir)/pkgconfig
  209. jardir = $(datadir)/java
  210. jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
  211. if INSTALL_ECJ_JAR
  212. jar_DATA += $(ECJ_BUILD_JAR)
  213. endif
  214. if JAVA_HOME_SET
  215. JAVA_HOME_DIR = $(JAVA_HOME)
  216. BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
  217. else
  218. JAVA_HOME_DIR = $(prefix)
  219. BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
  220. endif
  221. ## Name of the default .db.
  222. db_name = classmap.db
  223. ## Compiler specific component of the .db file
  224. gcjsubdir = @gcjsubdir@
  225. db_pathtail = $(gcjsubdir)/$(db_name)
  226. ## For now, only on native systems. FIXME.
  227. if NATIVE
  228. bin_programs = jv-convert gij grmic grmiregistry gcj-dbtool \
  229. gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
  230. gorbd grmid gserialver gtnameserv gc-analyze
  231. if CREATE_GJDOC
  232. bin_programs += gjdoc
  233. endif
  234. noinst_PROGRAMS =
  235. if INSTALL_BINARIES
  236. bin_PROGRAMS = $(bin_programs)
  237. else
  238. noinst_PROGRAMS += $(bin_programs)
  239. endif
  240. ## It is convenient to actually build and install the default database
  241. ## when gcj-dbtool is available.
  242. dbexec_DATA = $(db_name)
  243. endif
  244. bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
  245. if INSTALL_AOT_RPM
  246. bin_SCRIPTS += contrib/aot-compile-rpm
  247. endif
  248. if BUILD_ECJ1
  249. ## We build ecjx and not ecj1 because in one mode, ecjx will not work
  250. ## until after 'make install', and we don't want it to be picked up in
  251. ## the build tree by gcj via a -B option.
  252. libexecsub_PROGRAMS = ecjx
  253. endif
  254. ## ################################################################
  255. ##
  256. ## Compilers and compilation flags.
  257. ##
  258. ## The compiler with whatever flags we want for both -c and -C
  259. ## compiles.
  260. GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
  261. extra_ldflags_libjava = @extra_ldflags_libjava@
  262. extra_ldflags = @extra_ldflags@
  263. if ANONVERSCRIPT
  264. if ANONVERSCRIPT_GNU
  265. version_arg = -Wl,--version-script=$(srcdir)/libgcj.ver
  266. libgcj_la_version_arg = $(version_arg)
  267. libgcj_tools_la_version_arg = $(version_arg)
  268. lib_gnu_awt_xlib_la_version_arg = $(version_arg)
  269. libgcj_bc_la_version_arg = $(version_arg)
  270. version_dep = $(srcdir)/libgcj.ver
  271. libgcj_la_version_dep = $(version_dep)
  272. libgcj_tools_la_version_dep = $(version_dep)
  273. lib_gnu_awt_xlib_la_version_dep = $(version_dep)
  274. libgcj_bc_la_version_dep = $(version_dep)
  275. endif
  276. if ANONVERSCRIPT_SUN
  277. libgcj_la_version_arg = -Wl,-M,libgcj.ver-sun
  278. libgcj_tools_la_version_arg = -Wl,-M,libgcj_tools.ver-sun
  279. lib_gnu_awt_xlib_la_version_arg = -Wl,-M,lib_gnu_awt_xlib.ver-sun
  280. libgcj_bc_la_version_arg = -Wl,-M,libgcj_bc.ver-sun
  281. libgcj_la_version_dep = libgcj.ver-sun
  282. libgcj_tools_la_version_dep = libgcj_tools.ver-sun
  283. lib_gnu_awt_xlib_la_version_dep = lib_gnu_awt_xlib.ver-sun
  284. libgcj_bc_la_version_dep = libgcj_bc.ver-sun
  285. # The pattern rule necessary to build the *.ver-sun mapfiles is at the end
  286. # of the file, see below.
  287. endif
  288. else
  289. version_arg =
  290. libgcj_la_version_arg = $(version_arg)
  291. libgcj_tools_la_version_arg = $(version_arg)
  292. lib_gnu_awt_xlib_la_version_arg = $(version_arg)
  293. libgcj_bc_la_version_arg = $(version_arg)
  294. version_dep =
  295. libgcj_la_version_dep = $(version_dep)
  296. libgcj_tools_la_version_dep = $(version_dep)
  297. lib_gnu_awt_xlib_la_version_dep = $(version_dep)
  298. libgcj_bc_la_version_dep = $(version_dep)
  299. endif
  300. LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
  301. GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
  302. $(JC1FLAGS) $(LTLDFLAGS) -o $@
  303. GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
  304. GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
  305. LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
  306. $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
  307. CXXLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
  308. $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
  309. LIBGCC_UNWIND_INCLUDE = @LIBGCC_UNWIND_INCLUDE@
  310. WARNINGS = -Wextra -Wall
  311. ## Some systems don't allow `$' in identifiers by default, so we force
  312. ## it with -fdollars-in-identifiers. -Wswitch-enum detects bugs in
  313. ## the verifier implementation, and maybe other places. We need
  314. ## _GNU_SOURCE defined for some Linux builds. It doesn't hurt to
  315. ## always define it. Some systems, including Linux, need
  316. ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
  317. AM_CXXFLAGS = \
  318. -fno-rtti \
  319. -fnon-call-exceptions \
  320. $(THREADCXXFLAGS) \
  321. -fdollars-in-identifiers \
  322. -Wswitch-enum \
  323. -D_FILE_OFFSET_BITS=64 \
  324. @LIBGCJ_CXXFLAGS@ \
  325. $(WARNINGS) \
  326. -D_GNU_SOURCE \
  327. -DPREFIX="\"$(prefix)\"" \
  328. -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
  329. -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
  330. -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
  331. -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
  332. -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
  333. -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
  334. -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
  335. -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
  336. -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
  337. -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
  338. AM_GCJFLAGS = \
  339. @LIBGCJ_JAVAFLAGS@ \
  340. -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
  341. --encoding=UTF-8 \
  342. -Wno-deprecated -fbootstrap-classes
  343. AM_CFLAGS = @LIBGCJ_CFLAGS@
  344. if USING_GCC
  345. AM_CFLAGS += $(WARNINGS)
  346. endif
  347. if SUPPRESS_LIBGCJ_BC
  348. LIBGCJ_BC_FLAGS =
  349. else
  350. LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
  351. endif
  352. if BUILD_LIBGCJ_REDUCED_REFLECTION
  353. LIBGCJ_REDUCED_REFLECTION_FLAGS = -freduced-reflection
  354. else
  355. LIBGCJ_REDUCED_REFLECTION_FLAGS =
  356. endif
  357. ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
  358. PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
  359. JCFLAGS = -g
  360. JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
  361. LIBFFIINCS = @LIBFFIINCS@
  362. AM_CPPFLAGS = -I$(top_srcdir) \
  363. -Iinclude -I$(top_srcdir)/include \
  364. -I$(top_srcdir)/classpath/include \
  365. -Iclasspath/include \
  366. -I$(top_srcdir)/classpath/native/fdlibm \
  367. $(GCINCS) $(THREADINCS) $(INCLTDL) \
  368. $(LIBGCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
  369. BOOTCLASSPATH = $(srcdir)/classpath/lib
  370. ## ################################################################
  371. ##
  372. ## How to build libgcj.a and libgcj.jar
  373. ##
  374. libgij_la_SOURCES = gij.cc
  375. libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
  376. if BUILD_SUBLIBS
  377. libgij_la_DEPENDENCIES += libgcj-noncore.la
  378. endif
  379. ## See jv_convert_LDADD.
  380. libgij_la_LIBADD = -L$(here)/.libs libgcj.la
  381. ## The mysterious backslash in the grep pattern is consumed by make.
  382. libgij_la_LDFLAGS = -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
  383. -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
  384. libgij_la_LINK = $(CXXLINK) $(libgij_la_LDFLAGS)
  385. if INTERPRETER
  386. libgcj_interpret_source_files = jvmti.cc interpret.cc
  387. else
  388. libgcj_interpret_source_files =
  389. endif
  390. libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
  391. link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
  392. $(nat_source_files)
  393. ## We need to compile at least the interpreter this way.
  394. interpret.lo: AM_CXXFLAGS += -fwrapv
  395. ## Necessary so EH works on 64-bit Solaris 2.
  396. prims.lo: AM_CXXFLAGS += -fno-omit-frame-pointer
  397. if USING_BOEHMGC
  398. libgcj_la_SOURCES += boehm.cc
  399. endif
  400. if USING_NOGC
  401. libgcj_la_SOURCES += nogc.cc
  402. endif
  403. if USING_POSIX_PLATFORM
  404. libgcj_la_SOURCES += posix.cc
  405. endif
  406. if USING_WIN32_PLATFORM
  407. libgcj_la_SOURCES += win32.cc
  408. endif
  409. if USING_DARWIN_CRT
  410. libgcj_la_SOURCES += darwin.cc
  411. LIBJAVA_LDFLAGS_LIBMATH =
  412. else
  413. LIBJAVA_LDFLAGS_LIBMATH = -lm
  414. endif
  415. if USING_POSIX_THREADS
  416. libgcj_la_SOURCES += posix-threads.cc
  417. endif
  418. if USING_WIN32_THREADS
  419. libgcj_la_SOURCES += win32-threads.cc
  420. endif
  421. if USING_NO_THREADS
  422. libgcj_la_SOURCES += no-threads.cc
  423. endif
  424. ## Objects from C++ sources in subdirs.
  425. nat_files = $(nat_source_files:.cc=.lo)
  426. xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
  427. # Include THREADLIBS here to ensure that the correct version of
  428. # certain linuxthread functions get linked:
  429. ## The mysterious backslash in the grep pattern is consumed by make.
  430. libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
  431. $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
  432. -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
  433. $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL)
  434. libgcj_la_LIBADD = \
  435. classpath/native/fdlibm/libfdlibm.la \
  436. java/lang/Object.lo \
  437. java/lang/Class.lo \
  438. java/process-$(PLATFORM).lo \
  439. $(libgcj_la_LIBADD_SUBOBJECTS) \
  440. $(LIBFFI) $(ZLIBS) $(GCLIBS)
  441. libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
  442. java/lang/Object.lo \
  443. java/lang/Class.lo \
  444. java/process-$(PLATFORM).lo \
  445. $(ALL_PACKAGE_SOURCE_FILES_LO) \
  446. $(LIBLTDL) $(libgcj_la_LIBADD) \
  447. $(LIBJAVA_CORE_EXTRA) \
  448. $(libgcj_la_version_dep)
  449. libgcj_la_LINK = $(LIBLINK) $(libgcj_la_LDFLAGS) $(libgcj_la_version_arg)
  450. ## A hack to make sure the various gcj-related macros, like
  451. ## LTGCJCOMPILE, are defined by automake. This is never actually
  452. ## compiled.
  453. EXTRA_libgcj_la_SOURCES = java/lang/Object.java
  454. if BUILD_SUBLIBS
  455. ## This extra target is invoked on windows hosts only by adding it
  456. ## to LIBGCJ_SUBLIB_CORE_EXTRA_SRCS in configure.host, which causes
  457. ## it to be linked in to the core DLL and generate a circular import
  458. ## dependency loop between the two DLLs. This is required to fix
  459. ## PR42811 by ensuring that any application that links against
  460. ## either always loads both at runtime.
  461. DLL_VERSION=`expr \`grep -v '^\#' $(srcdir)/libtool-version | sed -e 's/\(.*\):\(.*\):.*/\1 + \2/'\``
  462. libgcj-noncore-dummy.dll.a : $(srcdir)/libgcj-noncore-dummy.def
  463. $(DLLTOOL) -d $^ -l $@ --dllname cyggcj-noncore-$(DLL_VERSION).dll
  464. ## These are the libtool definitions for the noncore library.
  465. libgcj_noncore_la_SOURCES =
  466. libgcj_noncore_la_LDFLAGS = $(libgcj_la_LDFLAGS)
  467. libgcj_noncore_la_LIBADD = $(libgcj_noncore_la_LIBADD_SUBOBJECTS) libgcj.la
  468. libgcj_noncore_la_DEPENDENCIES = libgcj-$(gcc_version).jar $(LIBLTDL) \
  469. $(libgcj_noncore_la_LIBADD) libgcj.la $(libgcj_la_version_dep)
  470. libgcj_noncore_la_LINK = $(libgcj_la_LINK)
  471. endif # BUILD_SUBLIBS
  472. # We compile libgcj_tools with -findirect-dispatch so that they can
  473. # depend on external classes: in particular, gjdoc uses antlr. In
  474. # addition, -fno-bootstrap-classes ensures that the tools are loaded
  475. # by the system class loader rather than the bootstrap class loader:
  476. # only core library classes should be loaded by the bootstrap loader.
  477. libgcj_tools_la_SOURCES = classpath/tools/tools.zip
  478. libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
  479. -fno-bootstrap-classes -fno-indirect-classes \
  480. -fsource-filename=$(here)/classpath/tools/all-classes.lst
  481. libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
  482. -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
  483. $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
  484. $(LIBJAVA_LDFLAGS_LIBMATH)
  485. libgcj_tools_la_LIBADD = libgcj.la
  486. libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \
  487. $(libgcj_tools_la_version_dep)
  488. if BUILD_SUBLIBS
  489. libgcj_tools_la_DEPENDENCIES += libgcj-noncore.la
  490. endif
  491. libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS) \
  492. $(libgcj_tools_la_version_arg)
  493. ## libjvm.so
  494. libjvm_la_SOURCES = jni-libjvm.cc
  495. libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
  496. if BUILD_SUBLIBS
  497. libjvm_la_DEPENDENCIES += libgcj-noncore.la
  498. endif
  499. ## See jv_convert_LDADD.
  500. libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
  501. libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC) \
  502. $(LIBJAVA_LDFLAGS_NOUNDEF)
  503. libjvm_la_LINK = $(CXXLINK) $(libjvm_la_LDFLAGS)
  504. ## The .db file. This rule is only used for native builds, so it is
  505. ## safe to invoke gcj-dbtool.
  506. $(db_name): gcj-dbtool$(EXEEXT)
  507. ## In case it exists already.
  508. @rm -f $(db_name)
  509. ## We don't actually care if it fails -- if it does, just make an
  510. ## empty file. This is simpler than trying to discover when mmap is
  511. ## not available.
  512. ./gcj-dbtool -n $(db_name) || touch $(db_name)
  513. lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
  514. lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
  515. lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
  516. libgcj.la libgcj.spec \
  517. $(lib_gnu_awt_xlib_la_version_dep) \
  518. $(lib_gnu_awt_xlib_la_LIBADD)
  519. if BUILD_SUBLIBS
  520. lib_gnu_awt_xlib_la_DEPENDENCIES += libgcj-noncore.la
  521. endif
  522. lib_gnu_awt_xlib_la_CPPFLAGS = \
  523. $(AM_CPPFLAGS) \
  524. $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
  525. ## The mysterious backslash in the grep pattern is consumed by make.
  526. lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDFLAGS) \
  527. @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
  528. -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
  529. -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
  530. lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS) \
  531. $(lib_gnu_awt_xlib_la_version_arg)
  532. ## Support for libgcj_bc: dummy shared library.
  533. ##
  534. ## This lets us have one soname in BC objects and another in C++ ABI objects.
  535. ## This library is not linked against libgcj.
  536. libgcj_bc_la_SOURCES = libgcj_bc.c
  537. install_libgcj_bc_la_SOURCES = $(libgcj_bc_la_SOURCES)
  538. libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
  539. $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
  540. libgcj_bc_la_DEPENDENCIES = libgcj.la $(libgcj_bc_la_version_dep)
  541. libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS) \
  542. $(libgcj_bc_la_version_arg)
  543. ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
  544. ## USE_LIBGCJ_BC shouldn't be set on other targets.
  545. libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
  546. -fPIC -nostdlib
  547. ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
  548. ## when testing.
  549. libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
  550. $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
  551. $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
  552. rm .libs/libgcj_bc.so; \
  553. mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
  554. $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
  555. -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
  556. rm .libs/libgcj_bc.so.1; \
  557. $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
  558. ## This rule creates the libgcj_bc library that is actually installed.
  559. install/libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES) install/$(am__dirstamp)
  560. $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
  561. $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS)
  562. ## Note that property_files is defined in sources.am.
  563. propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
  564. $(propertyo_files): %.lo: classpath/resource/%
  565. $(mkinstalldirs) `dirname $@`; \
  566. $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
  567. libgcj-$(gcc_version).jar: classpath/lib/compile-classes
  568. ## Note that this now omits the property files.
  569. ## It doesn't matter since we don't use the jar at runtime.
  570. here=`pwd`; cd $(srcdir)/classpath/lib; \
  571. find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
  572. $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
  573. libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
  574. cp $< $@
  575. CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
  576. DISTCLEANFILES = native.dirs
  577. mostlyclean-local:
  578. ## Use libtool rm to remove each libtool object
  579. find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
  580. distclean-local:
  581. ## Remove every .d file that was created.
  582. find . -name '*.d' -print | xargs rm -f
  583. # Just remove the objects from C++ sources, for testing the C++ compiler.
  584. clean-nat:
  585. rm -f $(nat_files) $(xlib_nat_files)
  586. SUFFIXES = .class .java .h .properties .list
  587. ## Pass the list of object files to libtool in a temporary file to
  588. ## avoid tripping platform command line length limits.
  589. lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
  590. @echo Creating list of files to link...
  591. @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
  592. $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
  593. -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
  594. ## ################################################################
  595. ## Compiling a list of java sources to a single .o.
  596. # Concurrent things use reflection internally.
  597. java/util/concurrent.lo \
  598. java/util/concurrent/atomic.lo \
  599. java/util/concurrent/locks.lo: LIBGCJ_REDUCED_REFLECTION_FLAGS =
  600. %.lo: %.list
  601. $(LTGCJCOMPILE) $(LIBGCJ_REDUCED_REFLECTION_FLAGS) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
  602. java/lang/Object.lo: classpath/lib/java/lang/Object.class
  603. $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
  604. java/lang/Class.lo: classpath/lib/java/lang/Class.class
  605. $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
  606. ## ################################################################
  607. ## This pulls in a number of variable and target definitions.
  608. include sources.am
  609. ## ################################################################
  610. ##
  611. ## How to build header files.
  612. ##
  613. ## We have special rules for certain headers.
  614. omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
  615. java/lang/String.h java/lang/reflect/Constructor.h \
  616. java/lang/reflect/Field.h java/lang/reflect/Method.h \
  617. java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
  618. inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
  619. java/io/ObjectInputStream$$GetField.h \
  620. java/nio/DirectByteBufferImpl$$ReadWrite.h \
  621. java/nio/channels/Pipe$$SinkChannel.h \
  622. java/nio/channels/Pipe$$SourceChannel.h \
  623. java/lang/VMProcess$ImmediateEOFInputStream.h \
  624. java/lang/reflect/Proxy$$ProxyData.h \
  625. java/lang/reflect/Proxy$$ProxyType.h \
  626. gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
  627. gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
  628. gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
  629. gnu/java/nio/PipeImpl$$SourceChannelImpl.h
  630. generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
  631. $(xlib_nat_headers)
  632. MYGCJH = gjavah
  633. $(generic_header_files): gcjh.stamp
  634. gcjh.stamp: classpath/lib/compile-classes
  635. if JAVA_MAINTAINER_MODE
  636. $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
  637. --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
  638. endif
  639. echo > gcjh.stamp
  640. nat_headers = $(ordinary_header_files) $(inner_nat_headers)
  641. nat_headers_install = $(ordinary_header_files)
  642. xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
  643. ## Headers we maintain by hand and which we want to install.
  644. extra_headers = java/lang/Object.h java/lang/Class.h
  645. $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
  646. @:
  647. install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
  648. install-libexecsubPROGRAMS
  649. ## Support for libgcj_bc: dummy shared library used only at link-time.
  650. if USE_LIBGCJ_BC
  651. ## Install libgcj_bc dummy lib in the target directory. We also need to delete
  652. ## libtool's .la file, this prevents libtool resetting the lib again
  653. ## later.
  654. @echo Installing dummy lib libgcj_bc.so.1.0.0; \
  655. rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
  656. mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
  657. $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
  658. -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
  659. rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
  660. $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
  661. rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
  662. endif
  663. if BUILD_ECJ1
  664. ## Undo any prepending of the target prefix and transform
  665. ## to the actual host's executable suffix.
  666. mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
  667. endif BUILD_ECJ1
  668. ## Install the headers. It is fairly ugly that we have to do this by
  669. ## hand.
  670. install_data_local_split = 50
  671. install-data-local:
  672. $(PRE_INSTALL)
  673. ## Install the .pc file.
  674. @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*[.][^.]*$$//'`; \
  675. file="libgcj-$${pc_version}.pc"; \
  676. $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
  677. echo " $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
  678. $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
  679. ## We use a GNU make trick here so that we don't go over the command
  680. ## length limit of some shells.
  681. @echo Creating list of headers to install...
  682. @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
  683. @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
  684. while read file; do echo "$$file $$file"; done < tmp-ilist | \
  685. sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
  686. $(AWK) 'BEGIN { files["."] = "" } \
  687. { files[$$2] = files[$$2] " " $$1; \
  688. if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
  689. END { for (dir in files) print dir, files[dir] }' | \
  690. while read dir files; do \
  691. xfiles=; for file in $$files; do \
  692. if test -f "$$file"; then xfiles="$$xfiles $$file"; \
  693. else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
  694. test -z "$$xfiles" || { \
  695. test "x$$dir" = x. || { \
  696. echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
  697. $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
  698. echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
  699. $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
  700. done
  701. -@rm -f tmp-ilist
  702. ## Install inner class headers.
  703. $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
  704. $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
  705. $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
  706. $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
  707. $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
  708. $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
  709. $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
  710. $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
  711. $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
  712. $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
  713. ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
  714. ## Install Python modules for aot-compile.
  715. $(mkinstalldirs) $(DESTDIR)$(python_mod_dir); \
  716. $(INSTALL_DATA) $(srcdir)/contrib/classfile.py \
  717. $(DESTDIR)$(python_mod_dir)/classfile.py; \
  718. $(INSTALL_DATA) contrib/aotcompile.py \
  719. $(DESTDIR)$(python_mod_dir)/aotcompile.py;
  720. if CREATE_JAVA_HOME
  721. ## Create sdk style directories
  722. $(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
  723. $(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
  724. $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)
  725. $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
  726. $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)
  727. $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
  728. relative() { \
  729. $(PERL) -e 'use File::Spec; \
  730. print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
  731. }; \
  732. RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
  733. ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  734. $(DESTDIR)$(SDK_BIN_DIR)/java; \
  735. ln -sf $$RELATIVE/`echo gjar | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  736. $(DESTDIR)$(SDK_BIN_DIR)/jar; \
  737. ln -sf $$RELATIVE/`echo gjdoc | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  738. $(DESTDIR)$(SDK_BIN_DIR)/javadoc; \
  739. ln -sf $$RELATIVE/`echo grmic | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  740. $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
  741. ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  742. $(DESTDIR)$(SDK_BIN_DIR)/javah; \
  743. ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  744. $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
  745. ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  746. $(DESTDIR)$(SDK_BIN_DIR)/jarsigner; \
  747. ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  748. $(DESTDIR)$(SDK_BIN_DIR)/rmiregistry; \
  749. ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  750. $(DESTDIR)$(SDK_BIN_DIR)/keytool; \
  751. ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  752. $(DESTDIR)$(SDK_BIN_DIR)/orbd; \
  753. ln -sf $$RELATIVE/`echo gnative2ascii | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  754. $(DESTDIR)$(SDK_BIN_DIR)/native2ascii; \
  755. ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  756. $(DESTDIR)$(SDK_BIN_DIR)/rmid; \
  757. ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  758. $(DESTDIR)$(SDK_BIN_DIR)/tnameserv; \
  759. ln -sf $$RELATIVE/`echo gserialver | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  760. $(DESTDIR)$(SDK_BIN_DIR)/serialver; \
  761. RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(JRE_BIN_DIR)); \
  762. ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  763. $(DESTDIR)$(JRE_BIN_DIR)/rmiregistry; \
  764. ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  765. $(DESTDIR)$(JRE_BIN_DIR)/keytool; \
  766. ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  767. $(DESTDIR)$(JRE_BIN_DIR)/java; \
  768. ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  769. $(DESTDIR)$(JRE_BIN_DIR)/orbd; \
  770. ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  771. $(DESTDIR)$(JRE_BIN_DIR)/rmid; \
  772. ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  773. $(DESTDIR)$(JRE_BIN_DIR)/tnameserv; \
  774. $(mkinstalldirs) $(DESTDIR)$(JVM_JAR_DIR); \
  775. version=$(JAVA_VERSION).$(BUILD_VERSION); \
  776. working_dir=`pwd`; \
  777. cd $(DESTDIR)$(JVM_JAR_DIR); \
  778. RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
  779. $(DESTDIR)$(JVM_JAR_DIR)); \
  780. for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
  781. jndi-ldap jndi-rmi jsse sasl; \
  782. do \
  783. ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
  784. done; \
  785. RELATIVE=$$(relative $(DESTDIR)$(jardir) \
  786. $(DESTDIR)$(JVM_JAR_DIR)); \
  787. for jar in *-$$version.jar; \
  788. do \
  789. ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
  790. ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|.jar|g"); \
  791. done; \
  792. cd $$working_dir; \
  793. $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
  794. RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
  795. $(DESTDIR)$(JRE_LIB_DIR)/security); \
  796. cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
  797. ln -sf $$RELATIVE/classpath.security java.security; \
  798. cd $$working_dir; \
  799. $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/linux; \
  800. $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
  801. $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
  802. $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
  803. RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
  804. $(DESTDIR)$(JRE_LIB_DIR)); \
  805. ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
  806. $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
  807. RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
  808. $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)); \
  809. ln -sf $$RELATIVE/libjawt.so \
  810. $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so; \
  811. RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
  812. $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client); \
  813. ln -sf $$RELATIVE/libjvm.so \
  814. $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client/libjvm.so; \
  815. RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
  816. $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
  817. ln -sf $$RELATIVE/libjvm.so \
  818. $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so; \
  819. RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
  820. $(DESTDIR)$(SDK_LIB_DIR)); \
  821. ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
  822. $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
  823. for headername in jawt jni; do \
  824. DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  825. -print-file-name=include/$$headername.h)); \
  826. RELATIVE=$$(relative $$DIRECTORY \
  827. $(DESTDIR)$(SDK_INCLUDE_DIR)); \
  828. ln -sf $$RELATIVE/$$headername.h \
  829. $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
  830. done; \
  831. for headername in jawt_md jni_md; do \
  832. DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
  833. -print-file-name=include/$$headername.h)); \
  834. RELATIVE=$$(relative $$DIRECTORY \
  835. $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
  836. ln -sf $$RELATIVE/$$headername.h \
  837. $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
  838. done; \
  839. RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
  840. $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR));
  841. endif
  842. ## ################################################################
  843. ##
  844. ## Additional `check' targets for maintainer convenience.
  845. ##
  846. ## This is used for maintainer-check. FIXME: should set from
  847. ## configure using AC_CHECK_TOOL.
  848. NM = nm
  849. ## Try to make sure our library doesn't stomp the namespace.
  850. maintainer-check: libgcj.la
  851. $(NM) .libs/libgcj.a | grep ' T ' \
  852. ## Anything with `4java' is assumed to be from .java source.
  853. | grep -v '4java' \
  854. ## Anything with Jv is ok.
  855. | grep -v 'Jv' \
  856. ## `terminate' and `unexpected' are part of the runtime.
  857. | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
  858. ## This rule can be used to see if the headers are more or less
  859. ## correct.
  860. header-check: libgcj-$(gcc_version).jar $(nat_headers)
  861. rm -f htest.cc; \
  862. for h in $(nat_headers); do \
  863. echo "#include \"$$h\"" >> htest.cc; \
  864. done; \
  865. $(CXXCOMPILE) -fsyntax-only htest.cc
  866. ## This rule can be used to see if all the .class files verify
  867. ## correctly.
  868. class-check: libgcj-$(gcc_version).jar
  869. @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
  870. while read f; do \
  871. echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
  872. if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
  873. :; else ok=1; fi; \
  874. done; exit $$ok
  875. ## This rule checks whether write_entries_to_file works properly.
  876. write-entries-to-file-check:
  877. @echo Creating list of files to link...
  878. @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
  879. ## ################################################################
  880. ##
  881. ## The `jv-convert' program and code to rebuild the converter header
  882. ## files.
  883. ##
  884. ## it only makes sense to try to rebuild the JIS .h files on native
  885. ## systems.
  886. if NATIVE
  887. if MAINTAINER_MODE
  888. noinst_PROGRAMS += gen-from-JIS
  889. gen_from_JIS_SOURCES = \
  890. gnu/gcj/convert/gen-from-JIS.c \
  891. gnu/gcj/convert/make-trie.c \
  892. gnu/gcj/convert/make-trie.h
  893. gen_from_JIS_DEPENDENCIES = \
  894. gnu/gcj/convert/JIS0201.h \
  895. gnu/gcj/convert/JIS0208.h \
  896. gnu/gcj/convert/JIS0212.h
  897. $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
  898. ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
  899. $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
  900. ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
  901. $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
  902. ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
  903. # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
  904. # You can get it from
  905. # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
  906. $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
  907. echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
  908. tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
  909. | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2) /*\3 */|p' \
  910. >> tmp-0201; \
  911. mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
  912. # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
  913. # You can get it from
  914. # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
  915. $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
  916. echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
  917. tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
  918. | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4) /*\5 */|p' \
  919. >> tmp-0208; \
  920. mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
  921. # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
  922. # You can get it from
  923. # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
  924. $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
  925. echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
  926. tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
  927. | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3) /*\4 */|p' \
  928. >> tmp-0212; \
  929. mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
  930. endif
  931. endif
  932. jv_convert_SOURCES =
  933. ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
  934. ## need this because we are explicitly using libtool to link using the
  935. ## `.la' file.
  936. jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
  937. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  938. jv_convert_LINK = $(GCJLINK) $(jv_convert_LDFLAGS)
  939. ## We don't explicitly link in the libraries we need; libgcj.la brings
  940. ## in all dependencies. We need the -L so that gcj can find libgcj
  941. ## with `-lgcj', but it must come first, otherwise the -L flags
  942. ## brought in from libgcj.la would cause the install directories to be
  943. ## searched before the build-tree ones, and we'd get errors because of
  944. ## different libraries with the same SONAME from picky linkers such as
  945. ## Solaris'. FIXME: should be _libs on some systems.
  946. jv_convert_LDADD = -L$(here)/.libs libgcj.la
  947. ## Depend on the spec file to make sure it is up to date before
  948. ## linking this program.
  949. jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
  950. if BUILD_SUBLIBS
  951. jv_convert_DEPENDENCIES += libgcj-noncore.la
  952. endif
  953. gcj_dbtool_SOURCES = \
  954. gnu/gcj/tools/gcj_dbtool/natMain.cc
  955. ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
  956. ## need this because we are explicitly using libtool to link using the
  957. ## `.la' file.
  958. gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
  959. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  960. gcj_dbtool_LINK = $(GCJLINK) $(gcj_dbtool_LDFLAGS)
  961. ## We don't explicitly link in the libraries we need; libgcj.la brings
  962. ## in all dependencies. We need the -L so that gcj can find libgcj
  963. ## with `-lgcj', but it must come first, otherwise the -L flags
  964. ## brought in from libgcj.la would cause the install directories to be
  965. ## searched before the build-tree ones, and we'd get errors because of
  966. ## different libraries with the same SONAME from picky linkers such as
  967. ## Solaris'. FIXME: should be _libs on some systems.
  968. gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
  969. ## Depend on the spec file to make sure it is up to date before
  970. ## linking this program.
  971. gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
  972. if BUILD_SUBLIBS
  973. gcj_dbtool_DEPENDENCIES += libgcj-noncore.la
  974. endif
  975. gc_analyze_SOURCES =
  976. ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
  977. ## need this because we are explicitly using libtool to link using the
  978. ## `.la' file.
  979. gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
  980. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  981. gc_analyze_LINK = $(GCJLINK) $(gc_analyze_LDFLAGS)
  982. ## See jv_convert_LDADD.
  983. gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
  984. ## Depend on the spec file to make sure it is up to date before
  985. ## linking this program.
  986. gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
  987. if BUILD_SUBLIBS
  988. gc_analyze_DEPENDENCIES += libgcj-noncore.la
  989. endif
  990. gij_SOURCES =
  991. ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
  992. ## need this because we are explicitly using libtool to link using the
  993. ## `.la' file.
  994. gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
  995. -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  996. gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
  997. ## See jv_convert_LDADD.
  998. gij_LDADD = -L$(here)/.libs libgij.la
  999. ## Depend on the spec file to make sure it is up to date before
  1000. ## linking this program.
  1001. gij_DEPENDENCIES = libgij.la
  1002. ## Build an ecjx from a .jar.
  1003. ecjx_SOURCES = ecjx.cc
  1004. ## We use the BC ABI here so that we don't need to compile ecj.jar.
  1005. ## Hopefully the user has compiled it into his system .db.
  1006. ## However, even if not it will run reasonably quickly.
  1007. ECJX_BASE_FLAGS = -findirect-dispatch \
  1008. --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
  1009. if NATIVE
  1010. ecjx_LINK = $(GCJLINK) $(ecjx_LDFLAGS)
  1011. if ENABLE_SHARED
  1012. ## Use ecj.jar at runtime.
  1013. ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
  1014. else !ENABLE_SHARED
  1015. ## Use ecj.jar at compile time.
  1016. ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
  1017. endif !ENABLE_SHARED
  1018. ecjx_LDADD = -L$(here)/.libs $(extra_ldflags)
  1019. ecjx_DEPENDENCIES = libgcj.la libgcj.spec
  1020. if BUILD_SUBLIBS
  1021. ecjx_DEPENDENCIES += libgcj-noncore.la
  1022. endif
  1023. if USE_LIBGCJ_BC
  1024. ecjx_DEPENDENCIES += libgcj_bc.la
  1025. else
  1026. ecjx_LDADD += libgcj.la
  1027. endif
  1028. else !NATIVE
  1029. ecjx_LINK = $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS)
  1030. ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
  1031. ecjx_LDADD =
  1032. ecjx_DEPENDENCIES =
  1033. ecjx.$(OBJEXT): ecjx.cc
  1034. $(GCC_FOR_ECJX) -c $<
  1035. endif !NATIVE
  1036. ## This is a dummy definition.
  1037. gappletviewer_SOURCES =
  1038. gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
  1039. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1040. gappletviewer_LINK = $(GCJLINK) $(gappletviewer_LDFLAGS)
  1041. ## See jv_convert_LDADD.
  1042. gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
  1043. gappletviewer_DEPENDENCIES = libgcj-tools.la
  1044. ## This is a dummy definition.
  1045. gjarsigner_SOURCES =
  1046. gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
  1047. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1048. gjarsigner_LINK = $(GCJLINK) $(gjarsigner_LDFLAGS)
  1049. ## See jv_convert_LDADD.
  1050. gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
  1051. gjarsigner_DEPENDENCIES = libgcj-tools.la
  1052. ## This is a dummy definition.
  1053. gkeytool_SOURCES =
  1054. gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
  1055. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1056. gkeytool_LINK = $(GCJLINK) $(gkeytool_LDFLAGS)
  1057. ## See jv_convert_LDADD.
  1058. gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
  1059. gkeytool_DEPENDENCIES = libgcj-tools.la
  1060. ## This is a dummy definition.
  1061. gjar_SOURCES =
  1062. gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
  1063. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1064. gjar_LINK = $(GCJLINK) $(gjar_LDFLAGS)
  1065. ## See jv_convert_LDADD.
  1066. gjar_LDADD = -L$(here)/.libs libgcj-tools.la
  1067. gjar_DEPENDENCIES = libgcj-tools.la
  1068. ## This is a dummy definition.
  1069. gjavah_SOURCES =
  1070. gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
  1071. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1072. gjavah_LINK = $(GCJLINK) $(gjavah_LDFLAGS)
  1073. ## See jv_convert_LDADD.
  1074. gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
  1075. gjavah_DEPENDENCIES = libgcj-tools.la
  1076. ## This is a dummy definition.
  1077. gcjh_SOURCES =
  1078. gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
  1079. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1080. gcjh_LINK = $(GCJLINK) $(gcjh_LDFLAGS)
  1081. ## See jv_convert_LDADD.
  1082. gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
  1083. gcjh_DEPENDENCIES = libgcj-tools.la
  1084. ## This is a dummy definition.
  1085. gnative2ascii_SOURCES =
  1086. gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
  1087. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1088. gnative2ascii_LINK = $(GCJLINK) $(gnative2ascii_LDFLAGS)
  1089. ## See jv_convert_LDADD.
  1090. gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
  1091. gnative2ascii_DEPENDENCIES = libgcj-tools.la
  1092. ## This is a dummy definition.
  1093. gorbd_SOURCES =
  1094. gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
  1095. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1096. gorbd_LINK = $(GCJLINK) $(gorbd_LDFLAGS)
  1097. ## See jv_convert_LDADD.
  1098. gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
  1099. gorbd_DEPENDENCIES = libgcj-tools.la
  1100. ## This is a dummy definition.
  1101. grmid_SOURCES =
  1102. grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
  1103. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1104. grmid_LINK = $(GCJLINK) $(grmid_LDFLAGS)
  1105. ## See jv_convert_LDADD.
  1106. grmid_LDADD = -L$(here)/.libs libgcj-tools.la
  1107. grmid_DEPENDENCIES = libgcj-tools.la
  1108. ## This is a dummy definition.
  1109. gserialver_SOURCES =
  1110. gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
  1111. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1112. gserialver_LINK = $(GCJLINK) $(gserialver_LDFLAGS)
  1113. ## See jv_convert_LDADD.
  1114. gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
  1115. gserialver_DEPENDENCIES = libgcj-tools.la
  1116. ## This is a dummy definition.
  1117. gtnameserv_SOURCES =
  1118. gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
  1119. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1120. gtnameserv_LINK = $(GCJLINK) $(gtnameserv_LDFLAGS)
  1121. ## See jv_convert_LDADD.
  1122. gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
  1123. gtnameserv_DEPENDENCIES = libgcj-tools.la
  1124. ## This is a dummy definition.
  1125. grmic_SOURCES =
  1126. grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
  1127. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1128. grmic_LINK = $(GCJLINK) $(grmic_LDFLAGS)
  1129. ## See jv_convert_LDADD.
  1130. grmic_LDADD = -L$(here)/.libs libgcj-tools.la
  1131. grmic_DEPENDENCIES = libgcj-tools.la
  1132. ## This is a dummy definition.
  1133. grmiregistry_SOURCES =
  1134. grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
  1135. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1136. grmiregistry_LINK = $(GCJLINK) $(grmiregistry_LDFLAGS)
  1137. ## See jv_convert_LDADD.
  1138. grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
  1139. grmiregistry_DEPENDENCIES = libgcj-tools.la
  1140. ## This is a dummy definition.
  1141. gjdoc_SOURCES =
  1142. gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
  1143. -Djava.class.path=$(ANTLR_JAR) \
  1144. -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
  1145. gjdoc_LINK = $(GCJLINK) $(gjdoc_LDFLAGS)
  1146. ## See jv_convert_LDADD.
  1147. gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
  1148. gjdoc_DEPENDENCIES = libgcj-tools.la
  1149. ## ################################################################
  1150. if INTERPRETER
  1151. nat_jdwp_source_files = \
  1152. gnu/classpath/jdwp/natVMFrame.cc \
  1153. gnu/classpath/jdwp/natVMMethod.cc \
  1154. gnu/classpath/jdwp/natVMVirtualMachine.cc
  1155. nat_jvmti_source_files = \
  1156. gnu/gcj/jvmti/natBreakpoint.cc \
  1157. gnu/gcj/jvmti/natNormalBreakpoint.cc
  1158. else
  1159. nat_jdwp_source_files =
  1160. nat_jvmti_source_files =
  1161. endif
  1162. ## This lists all the C++ source files in subdirectories.
  1163. nat_source_files = \
  1164. $(nat_jdwp_source_files) \
  1165. gnu/classpath/natConfiguration.cc \
  1166. gnu/classpath/natSystemProperties.cc \
  1167. gnu/classpath/natVMStackWalker.cc \
  1168. gnu/gcj/natCore.cc \
  1169. gnu/gcj/convert/JIS0208_to_Unicode.cc \
  1170. gnu/gcj/convert/JIS0212_to_Unicode.cc \
  1171. gnu/gcj/convert/Unicode_to_JIS.cc \
  1172. gnu/gcj/convert/natIconv.cc \
  1173. gnu/gcj/convert/natInput_EUCJIS.cc \
  1174. gnu/gcj/convert/natInput_SJIS.cc \
  1175. gnu/gcj/convert/natOutput_EUCJIS.cc \
  1176. gnu/gcj/convert/natOutput_SJIS.cc \
  1177. gnu/gcj/io/natSimpleSHSStream.cc \
  1178. gnu/gcj/io/shs.cc \
  1179. $(nat_jvmti_source_files) \
  1180. gnu/gcj/runtime/natFinalizerThread.cc \
  1181. gnu/gcj/runtime/natSharedLibLoader.cc \
  1182. gnu/gcj/runtime/natSystemClassLoader.cc \
  1183. gnu/gcj/runtime/natStringBuffer.cc \
  1184. gnu/gcj/util/natDebug.cc \
  1185. gnu/gcj/util/natGCInfo.cc \
  1186. gnu/java/lang/natMainThread.cc \
  1187. gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
  1188. gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
  1189. gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
  1190. gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
  1191. gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
  1192. gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
  1193. gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
  1194. gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
  1195. gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
  1196. gnu/java/net/natPlainDatagramSocketImpl.cc \
  1197. gnu/java/net/natPlainSocketImpl.cc \
  1198. gnu/java/net/protocol/core/natCoreInputStream.cc \
  1199. gnu/java/nio/natVMPipe.cc \
  1200. gnu/java/nio/natVMSelector.cc \
  1201. gnu/java/nio/natNIOServerSocket.cc \
  1202. gnu/java/nio/natVMChannel.cc \
  1203. gnu/java/nio/channels/natFileChannelImpl.cc \
  1204. gnu/java/security/jce/prng/natVMSecureRandom.cc \
  1205. java/io/natFile.cc \
  1206. java/io/natVMConsole.cc \
  1207. java/io/natVMObjectInputStream.cc \
  1208. java/io/natVMObjectStreamClass.cc \
  1209. java/lang/natCharacter.cc \
  1210. java/lang/natClass.cc \
  1211. java/lang/natClassLoader.cc \
  1212. java/lang/natConcreteProcess.cc \
  1213. java/lang/natVMDouble.cc \
  1214. java/lang/natVMFloat.cc \
  1215. java/lang/natMath.cc \
  1216. java/lang/natObject.cc \
  1217. java/lang/natRuntime.cc \
  1218. java/lang/natString.cc \
  1219. java/lang/natAbstractStringBuffer.cc \
  1220. java/lang/natSystem.cc \
  1221. java/lang/natThread.cc \
  1222. java/lang/natThreadLocal.cc \
  1223. java/lang/natVMClassLoader.cc \
  1224. java/lang/natVMProcess.cc \
  1225. java/lang/natVMThrowable.cc \
  1226. java/lang/ref/natReference.cc \
  1227. java/lang/reflect/natArray.cc \
  1228. java/lang/reflect/natConstructor.cc \
  1229. java/lang/reflect/natField.cc \
  1230. java/lang/reflect/natMethod.cc \
  1231. java/lang/reflect/natVMProxy.cc \
  1232. java/net/natVMInetAddress.cc \
  1233. java/net/natVMNetworkInterface.cc \
  1234. java/net/natVMURLConnection.cc \
  1235. java/nio/channels/natVMChannels.cc \
  1236. java/nio/natVMDirectByteBufferImpl.cc \
  1237. java/security/natVMAccessController.cc \
  1238. java/security/natVMAccessControlState.cc \
  1239. java/text/natCollator.cc \
  1240. java/util/natVMTimeZone.cc \
  1241. java/util/concurrent/atomic/natAtomicLong.cc \
  1242. java/util/logging/natLogger.cc \
  1243. java/util/zip/natDeflater.cc \
  1244. java/util/zip/natInflater.cc \
  1245. sun/misc/natUnsafe.cc
  1246. xlib_nat_source_files = \
  1247. gnu/gcj/xlib/natClip.cc \
  1248. gnu/gcj/xlib/natColormap.cc \
  1249. gnu/gcj/xlib/natDisplay.cc \
  1250. gnu/gcj/xlib/natDrawable.cc \
  1251. gnu/gcj/xlib/natFont.cc \
  1252. gnu/gcj/xlib/natGC.cc \
  1253. gnu/gcj/xlib/natPixmap.cc \
  1254. gnu/gcj/xlib/natScreen.cc \
  1255. gnu/gcj/xlib/natVisual.cc \
  1256. gnu/gcj/xlib/natWMSizeHints.cc \
  1257. gnu/gcj/xlib/natWindow.cc \
  1258. gnu/gcj/xlib/natWindowAttributes.cc \
  1259. gnu/gcj/xlib/natXAnyEvent.cc \
  1260. gnu/gcj/xlib/natXButtonEvent.cc \
  1261. gnu/gcj/xlib/natXColor.cc \
  1262. gnu/gcj/xlib/natXConfigureEvent.cc \
  1263. gnu/gcj/xlib/natXException.cc \
  1264. gnu/gcj/xlib/natXExposeEvent.cc \
  1265. gnu/gcj/xlib/natXImage.cc \
  1266. gnu/gcj/xlib/natXUnmapEvent.cc
  1267. ## ################################################################
  1268. ##
  1269. ## Creating and installing sources.zip
  1270. ##
  1271. ## Create a zip holding all the sources. This can be meaningfully
  1272. ## used in Eclipse.
  1273. src.zip:
  1274. -rm -f src.zip
  1275. here=`pwd`; \
  1276. ( \
  1277. ( cd $(srcdir)/classpath; \
  1278. find java gnu javax org sun -name '*.java' -print | \
  1279. while read file; do \
  1280. ## Ugly code to avoid "echo -C". Must separate each entry by a newline
  1281. ## Gross but easy.
  1282. echo "x-C" | sed -e 's/^.//'; \
  1283. echo $(srcdir)/classpath; \
  1284. echo $$file; \
  1285. done ); \
  1286. ( cd $(srcdir)/classpath/external/sax; \
  1287. find org -name '*.java' -print | \
  1288. while read file; do \
  1289. echo "x-C" | sed -e 's/^.//'; \
  1290. echo $(srcdir)/classpath/external/sax; \
  1291. echo $$file; \
  1292. done ); \
  1293. ( cd $(srcdir)/classpath/external/relaxngDatatype; \
  1294. find org -name '*.java' -print | \
  1295. while read file; do \
  1296. echo "x-C" | sed -e 's/^.//'; \
  1297. echo $(srcdir)/classpath/external/relaxngDatatype; \
  1298. echo $$file; \
  1299. done ); \
  1300. ( cd $(srcdir)/classpath/external/w3c_dom; \
  1301. find org -name '*.java' -print | \
  1302. while read file; do \
  1303. echo "x-C" | sed -e 's/^.//'; \
  1304. echo $(srcdir)/classpath/external/w3c_dom; \
  1305. echo $$file; \
  1306. done ); \
  1307. ## Now the build tree.
  1308. ( cd classpath; \
  1309. find gnu java -name '*.java' -print | \
  1310. while read file; do \
  1311. echo "x-C" | sed -e 's/^.//'; \
  1312. echo `pwd`; \
  1313. echo $$file; \
  1314. done ); \
  1315. ) | \
  1316. ## Many of the above circumlocutions were because ZIP used to be a
  1317. ## relative path to fastjar. It didn't seem worthwhile to change the
  1318. ## code when we moved to an external jar.
  1319. $(JAR) -cfM@ $$here/src.zip
  1320. ## Override GNU Classpath sources with libgcj replacements.
  1321. here=`pwd`; \
  1322. ( \
  1323. ( cd $(srcdir); \
  1324. find gnu java -name '*.java' -print | \
  1325. while read file; do \
  1326. echo "x-C" | sed -e 's/^.//'; \
  1327. echo $(srcdir); \
  1328. echo $$file; \
  1329. done ); \
  1330. ) | \
  1331. $(JAR) -ufM@ $$here/src.zip
  1332. ## We use a variable for this in case the user wants to override it.
  1333. sourcesdir = $(jardir)
  1334. install-src.zip: src.zip
  1335. $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
  1336. ## ################################################################
  1337. ##
  1338. ## Dependency tracking madness.
  1339. ##
  1340. ## This is an evil hack to work around an automake limitation. We
  1341. ## need to ensure that all CNI headers are built, not just the ones
  1342. ## used internally by libgcj. We can't make the .o files depend on
  1343. ## nat_headers, because in that case we'll force a complete rebuild of
  1344. ## the C++ code whenever any .java file is touched. So instead we
  1345. ## have a dummy rule which is only used once, namely the first time a
  1346. ## build is done. On subsequent builds, the dependency tracking for
  1347. ## the .cc compilations will have picked up the .h files, and these
  1348. ## will be built directly as needed.
  1349. headers.stamp:
  1350. ## Note that we don't use a real dependency here, since we don't want
  1351. ## to rebuild all the headers here when the header list changes. If
  1352. ## we did rebuild here, then any addition of a .java file would cause
  1353. ## a large number of recompilations.
  1354. $(MAKE) create-headers
  1355. @echo > headers.stamp
  1356. headers_to_make = $(nat_headers)
  1357. if XLIB_AWT
  1358. headers_to_make += $(xlib_nat_headers)
  1359. endif
  1360. create-headers: $(headers_to_make)
  1361. .PHONY: create-headers
  1362. $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
  1363. $(libgij_la_OBJECTS): headers.stamp
  1364. $(libjvm_la_OBJECTS): headers.stamp
  1365. ## ################################################################
  1366. ##
  1367. ## This section is for make and multilib madness.
  1368. ##
  1369. # Work around what appears to be a GNU make bug handling MAKEFLAGS
  1370. # values defined in terms of make variables, as is the case for CC and
  1371. # friends when we are called from the top level Makefile.
  1372. AM_MAKEFLAGS = \
  1373. "AR_FLAGS=$(AR_FLAGS)" \
  1374. "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  1375. "CFLAGS=$(CFLAGS)" \
  1376. "CXXFLAGS=$(CXXFLAGS)" \
  1377. "CPPFLAGS=$(CPPFLAGS)" \
  1378. "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
  1379. "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
  1380. "INSTALL=$(INSTALL)" \
  1381. "INSTALL_DATA=$(INSTALL_DATA)" \
  1382. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  1383. "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  1384. "GCJFLAGS=$(GCJFLAGS)" \
  1385. "LDFLAGS=$(LDFLAGS)" \
  1386. "LIBCFLAGS=$(LIBCFLAGS)" \
  1387. "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  1388. "MAKE=$(MAKE)" \
  1389. "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  1390. "PICFLAG=$(PICFLAG)" \
  1391. "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
  1392. "SHELL=$(SHELL)" \
  1393. "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  1394. "exec_prefix=$(exec_prefix)" \
  1395. "datadir=$(datadir)" \
  1396. "infodir=$(infodir)" \
  1397. "libdir=$(libdir)" \
  1398. "mandir=$(mandir)" \
  1399. "prefix=$(prefix)" \
  1400. "gxx_include_dir=$(gxx_include_dir)" \
  1401. "AR=$(AR)" \
  1402. "AS=$(AS)" \
  1403. "DLLTOOL=$(DLLTOOL)" \
  1404. "LD=$(LD)" \
  1405. "LIBCFLAGS=$(LIBCFLAGS)" \
  1406. "NM=$(NM)" \
  1407. "PICFLAG=$(PICFLAG)" \
  1408. "RANLIB=$(RANLIB)" \
  1409. "DESTDIR=$(DESTDIR)" \
  1410. "JAR=$(JAR)"
  1411. # Subdir rules rely on $(FLAGS_TO_PASS)
  1412. FLAGS_TO_PASS = $(AM_MAKEFLAGS)
  1413. CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
  1414. MAKEOVERRIDES=
  1415. # Multilib support variables.
  1416. MULTISRCTOP =
  1417. MULTIBUILDTOP =
  1418. MULTIDIRS =
  1419. MULTISUBDIR =
  1420. MULTIDO = true
  1421. MULTICLEAN = true
  1422. # Multilib support.
  1423. .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
  1424. maintainer-clean-multi
  1425. all-recursive: all-multi
  1426. install-recursive: install-multi
  1427. mostlyclean-recursive: mostlyclean-multi
  1428. clean-recursive: clean-multi
  1429. distclean-recursive: distclean-multi
  1430. maintainer-clean-recursive: maintainer-clean-multi
  1431. all-multi:
  1432. : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
  1433. install-multi:
  1434. $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
  1435. mostlyclean-multi:
  1436. $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
  1437. clean-multi:
  1438. $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
  1439. distclean-multi:
  1440. $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
  1441. maintainer-clean-multi:
  1442. $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
  1443. if ANONVERSCRIPT
  1444. if ANONVERSCRIPT_SUN
  1445. # This must be at the end of the Makefile, otherwise .SECONDEXPANSION
  1446. # causes expansion of filenames with $ in their names, which breaks the build.
  1447. # .SECONDEXPANSION is necessary to allow the use of automatic variables ($@
  1448. # in this case) in the requisites of pattern rules.
  1449. .SECONDEXPANSION:
  1450. %.ver-sun : $(srcdir)/libgcj.ver \
  1451. $(top_srcdir)/../contrib/make_sunver.pl \
  1452. $$($$(basename $$@)_la_OBJECTS) $$($$(basename $$@)_la_LIBADD)
  1453. perl $(top_srcdir)/../contrib/make_sunver.pl \
  1454. $(srcdir)/libgcj.ver \
  1455. `echo $($(basename $@)_la_OBJECTS) $($(basename $@)_la_LIBADD) | \
  1456. sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
  1457. > $@ || (rm -f $@ ; exit 1)
  1458. endif
  1459. endif