From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ca5e4a3e79e64cb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!62.179.104.142.MISMATCH!amsnews11.chello.com!newsgate.cistron.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Including C source in GNAT project for building library Date: Thu, 24 Jan 2008 06:05:51 +0000 Organization: Pushface Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1201154752 741 62.49.19.209 (24 Jan 2008 06:05:52 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 24 Jan 2008 06:05:52 +0000 (UTC) Cancel-Lock: sha1:yLzI3FCaCj2OqppKSI03sRG/PZ8= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) Xref: g2news1.google.com comp.lang.ada:19573 Date: 2008-01-24T06:05:51+00:00 List-Id: Simon Wright writes: > As well as Ada source, this library needs two C-sourced units to act > as wrappers for macros in the Tcl/Tk header files. > > I can do this by hand (obviously only for a static library) by doing > this after gnatmake has done its part: > > gcc -c -g -O2 -I/usr/include tclmacro.c > gcc -c -g -O2 -I/usr/include tkmacro.c > ar -r lib/libtash.a tclmacro.o tkmacro.o > ranlib lib/libtash.a > > but can't help feeling there should be a way to tell gnatmake to do > this! OK, this seems to work: gprmake -P build_tash_library.gpr gnatmake -P build_tash_library.gpr because gnatmake includes all the objects it finds in the object directory in the resulting library. Is this The Way?