Skip to content
Browse files

compile libvpi.a with PIC flags (Dan McMahill)

  • Loading branch information...
1 parent 4e700bf commit 3154f078174da82e84cafe01d351f090abed1d20 steve committed
Showing with 11 additions and 2 deletions.
  1. +11 −2 Makefile.in
View
13 Makefile.in
@@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA
#
-#ident "$Id: Makefile.in,v 1.97 2001/06/12 03:53:10 steve Exp $"
+#ident "$Id: Makefile.in,v 1.98 2001/07/11 19:32:02 steve Exp $"
#
#
SHELL = /bin/sh
@@ -48,6 +48,7 @@ STRIP = @STRIP@
CPPFLAGS = @CPPFLAGS@ @DEFS@
CXXFLAGS = @CXXFLAGS@ -I. -I$(srcdir)
+PICFLAGS = @PICFLAG@
LDFLAGS = @LDFLAGS@
# The TARGETS variable lists the target modules that can be build and
@@ -78,7 +79,7 @@ check: all
./check | grep 'Hello, World'
clean:
- rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc ivl@EXEEXT@ libivl.a
+ rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc ivl@EXEEXT@ libivl.a libvpi.a
cd vvm ; $(MAKE) clean
cd vpi ; $(MAKE) clean
cd driver ; $(MAKE) clean
@@ -124,6 +125,14 @@ libvpi.a: vpithunk.o
rm -f $@
ar cvq $@ vpithunk.o
+# The vpithunk.c file (that makes up the libvpi.a library) needs to
+# be make with PIC flags, because shared objects load it.
+vpithunk.o: vpithunk.c
+ @[ -d dep ] || mkdir dep
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) -MD -c $< -o $*.o
+ mv $*.d dep/$*.d
+
+
ifeq (@WIN32@,yes)
ivl@EXEEXT@: $O ivl.def
dlltool --dllname ivl@EXEEXT@ --def ivl.def \

0 comments on commit 3154f07

Please sign in to comment.
Something went wrong with that request. Please try again.