Article View: gnu.gcc.help
Article #41948Re: GCC 2.7.2+repo templates & libraries
From: Sean Kelley
Date: Sun, 04 Feb 1996 00:00
Date: Sun, 04 Feb 1996 00:00
38 lines
1341 bytes
1341 bytes
Hi,
I would like to thank grib@cs.utexas.edu and khan@xraylith.wisc.edu
for their help! The following scheme seems to work:
%.so : %.cc
$(CC) $(CFLAGS) -c -frepo -fpic $< -o $@
%.o : %.cc
$(CC) $(CFLAGS) -c -frepo $< -o $@
LIBSRC=a.cc b.cc ...
LIBOBJ=${LIBSRC:.cc=.so}
libdummy: libdummy.o ${LIBOBJ}
$(CC) $(CFLAGS) libdummy.o $(LIBOBJ) -o $@ $(LIBS)
cp /dev/null $@
libreal.so: libdummy
$(CC) $(CFLAGS) -shared $(LIBOBJ) -o $@.1 $(LIBS)
rm -f $@
ln -s $@.1 $@
testprog: testprog.o libreal.so
$(CC) $(CFLAGS) testprog.o -o $@ -L. -lreal $(LIBS)
The file 'libdummy.cc' contains the following:
int main() { return 0; }
Making the 'libdummy' executable causes GCC to generate the
templates used by the library.
Thanks again for the prompt help.
Sean.
--
---
skelley@dgs.dgsys.com [home]
skelley@dsava.com [work]
"origami: a creative approach to paperwork"
Technical Details
Message-ID:
<4f1e8d$fvk@news.dgsys.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<4f06md$lhc@news.dgsys.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,5aeb3c349ca612ba X-Google-Attributes: gid11318c,public From: skelley@dgsys.com (Sean Kelley) Subject: Re: GCC 2.7.2+repo templates & libraries Date: 1996/02/04 Message-ID: <4f1e8d$fvk@news.dgsys.com> X-Deja-AN: 137985519 distribution: world references: <4f06md$lhc@news.dgsys.com> organization: Digital Gateway Systems newsgroups: gnu.gcc.help