Try my attached, modified make file. It works fine for me (Fedora Core
2).

If (from what I can remember!) copies the shared library (.so)
to /usr/lib and also copies the header files to /usr/include/cryptopp

As I said works fine for me. Checkout the make file for yourself though
of course.

Regards

Jim Vanns

On Mon, 2005-01-10 at 07:51 -0800, Jonathan Ryshpan wrote:
> I have just successfully compiled cryptopp for Fedora Core 3.  A few
> questions:
> 
> (1) Is there a way to get a shared object library (libcryptopp.so)?  The
> standard Makefile produces only the static library libcryptopp.a .
> 
> (2) What files should be installed for general use?  An application that
> I am trying to compile implies (by its error messages) that some of the
> *.h files should be installed in /usr/local/include/cryptopp/...  Which
> header files should be installed here?  I assume the libraries go
> into /usr/local/lib/...
> 
> Let me suggest that it would be very useful to put the answers to these
> questions into Readme.txt, and standard methods for doing them into the
> Makefile.
-- 
James Vanns BSc (Hons) MCP
Linux Systems Administrator
Software Engineer (Linux / C & C++)
Canterbury Christ Church University College
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x24045370

CXX = g++
LD = ld
LN = ln

CXXFLAGS = -pipe -msse2 -O2 -DNDEBUG
LDFLAGS = -shared -Wl,-soname,libcryptopp.so.5 -o libcryptopp.so.5.2
LNFLAGS = -s -f

SRCS = $(wildcard *.cpp)
ifeq ($(SRCS),)
SRCS = $(shell ls *.cpp)
endif
OBJS = $(SRCS:.cpp=.o)
TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o 
datatest.o regtest.o fipsalgt.o dlltest.o
LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))

all: cryptest

install: libcryptopp.so
        install -o root -g root -m 0755 -v libcryptopp.so.5.2 /usr/lib
        $(LN) $(LNFLAGS) /usr/lib/libcryptopp.so.5.2 /usr/lib/libcryptopp.so.5
        $(LN) $(LNFLAGS) /usr/lib/libcryptopp.so.5 /usr/lib/libcryptopp.so
        mkdir -p -m 0755 /usr/include/cryptopp-5.2
        $(LN) $(LNFLAGS) /usr/include/cryptopp-5.2 /usr/include/cryptopp
        install -o root -g root -m 0644 -v *.h /usr/include/cryptopp-5.2

clean:
        $(RM) cryptest libcryptopp.so.5.2 $(LIBOBJS) $(TESTOBJS)

libcryptopp.so: $(LIBOBJS)
        $(CXX) $(LDFLAGS) $(LIBOBJS) -lc
        $(LN) $(LNFLAGS) libcryptopp.so.5.2 libcryptopp.so.5
        $(LN) $(LNFLAGS) libcryptopp.so.5 libcryptopp.so

cryptest: libcryptopp.so $(TESTOBJS)
        $(CXX) $(CXXFLAGS) -o $@ $(TESTOBJS) -L. -lcryptopp

adhoc.cpp: adhoc.cpp.proto
ifeq ($(wildcard adhoc.cpp),)
        cp adhoc.cpp.proto adhoc.cpp
else
        touch adhoc.cpp
endif

%.o : %.cpp
        $(CXX) $(CXXFLAGS) -fPIC -c $<

Reply via email to