aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWojciech A. Koszek <wkoszek@laptop.freebsd.czest.pl>2010-01-31 18:55:57 +0000
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-02-01 13:20:27 +0100
commite814cf8107e88f8cd77e999c7e229d483c22a1a8 (patch)
tree1be997dc385cd5d37506e9cd7f8bcf5085f7d987 /Makefile
parent3e7a5ee7f87d4de5eb40eecebf8a3c6d9f6ac02f (diff)
downloadjimtcl-e814cf8107e88f8cd77e999c7e229d483c22a1a8.zip
jimtcl-e814cf8107e88f8cd77e999c7e229d483c22a1a8.tar.gz
jimtcl-e814cf8107e88f8cd77e999c7e229d483c22a1a8.tar.bz2
Correct the way in which we build shared library. This should silence all
warnings on GNU/Linux systems. While being here, make "libjim" a meta target and generate a library in "libjim.so" target.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 64dcefc..b0bd944 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,8 @@ INSTALL_PROGRAM= $(INSTALL)
INSTALL_DATA= $(INSTALL) -m 644
DESTDIR = /usr/local/bin/
-PROGRAMS = jim jim.exe libjim
+PROGRAMS = jim jim.exe
+JIM_SRCS = jim.c
JIM_OBJECTS = jim.o jimsh.o
LIBS = -ldl
@@ -108,8 +109,10 @@ jim-sdl-1.0.so: jim-sdl.xo
jim: $(JIM_OBJECTS)
$(CC) $(LDFLAGS) -o jim $(JIM_OBJECTS) $(LIBS)
-libjim: $(JIM_OBJECTS)
- $(CC) $(LDFLAGS) -shared -o libjim.so $(JIM_OBJECTS) $(LIBS)
+libjim: libjim.so
+
+libjim.so: $(JIM_SRCS)
+ $(CC) $(LDFLAGS) -fpic -fPIC -shared -o libjim.so $> $(LIBS)
readline: jim-readline-1.0.so
posix: jim-posix-1.0.so