summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d255e83..311e5e2 100644
--- a/Makefile
+++ b/Makefile
@@ -36,12 +36,16 @@ FINK=$(USR)
LIBXM = $(FINK)
endif
LIBXM = $(FINK)/sw/lib/libXm.a -lXp
+GMPLIBDIR=../gmp-4.3.2-darwin9/lib
+GMP_LIBS=-all_load $(GMPLIBDIR)/libgmpxx.a $(GMPLIBDIR)/libgmp.a
else
ARCH_FLAGS=-march=i686 -m32
SHARED_FLAGS=-shared
SHARED_EXT=so
LD = g++ -m32
STRIP = strip --strip-unneeded
+GMPLIBDIR=../gmp-4.3.2-linux/lib
+GMP_LIBS=-Wl,--whole-archive $(GMPLIBDIR)/libgmpxx.a $(GMPLIBDIR)/libgmp.a -Wl,--no-whole-archive
endif
INCLUDES = \
@@ -65,8 +69,6 @@ GMP_SOURCES = \
plugin-luagmp.cc \
lgmp.lua \
-GMP_LIBS = -lgmp
-
WHOLE_SOURCES = \
$(GMP_SOURCES) \
@@ -91,7 +93,7 @@ luagmp.a: $(addsuffix .o, $(notdir $(basename $(GMP_SOURCES))))
$(AR) $@ $+
luagmp.$(SHARED_EXT): plugin-luagmp.o luagmp.a
- $(LD) $(LDFLAGS) -o $@ $+ $(IM_LIBS) $(CD_LIBS) $(IUP_LIBS)
+ $(LD) $(LDFLAGS) -o $@ $+ $(GMP_LIBS)
clean:
rm -f *.o *.dep *.so *.dylib *.a