On Tue, Jul 14, 2009 at 10:16 AM, Steinar H.
Gunderson<[email protected]> wrote:
>> I just had to add  "-ldl -lrt -lidn -lldap -lz" to the library list.
>> This could probably be reduced by building libcurl from source and
>> deselecting some options.
>
> FWIW, the standard Makefile idiom you want is to replace -lcurl with
>
>  $(shell pkg-config --static --libs libcurl)
>
> which will expand to the output of that command, run once.

Thanks, Steinar, I was able to build a linux version using the makefile below,
which was created prior to your last mail.

I'd appreciate any feedback, especially:

1)  Should I configure libcurl without more stuff?  I stay as far away from
networking internals as possible.
2)  I left the libraries that libcurl needs dynamicly linked.  Would you
recommend that some of these be static instead?



# Makefile for Linux 32-bit mprime
#
# NOTES: libcurl built by downloading latest sources and:
#       ./configure --without-ssl --without-libssh2
#       make
#       make install
# Libraries to include were calculated using:
#       curl-config --static-libs

CC = gcc
CFLAGS = -I.. -I../gwnum -O2 -march=i486 -malign-double

CPP = g++
CPPFLAGS = -I.. -I../gwnum -O2 -march=i486 -malign-double

LFLAGS = -Wl,-M
LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic
-lcurl -lstdc++ -Wl,-Bdynamic -ldl -lidn -lldap -lrt -lz

FACTOROBJ = factor32.o
LINUXOBJS = prime.o menu.o
EXE      = mprime

#########################################################################

$(EXE): security $(LINUXOBJS) $(FACTOROBJ)
        $(CC) $(LFLAGS) -o $(EXE) $(LINUXOBJS) $(FACTOROBJ) $(LIBS)

security:
        [ ! -e ../security.h ] && touch ../security.h || true
        [ ! -e ../security.c ] && touch ../security.c || true
        [ ! -e ../secure5.c ] && touch ../secure5.c || true

clean:
        rm -f $(EXE) $(EXE2) $(LINUXOBJS)

.c.o:
        $(CC) $(CFLAGS) -c $<

.cpp.o:
        $(CPP) $(CPPFLAGS) -c $<
_______________________________________________
Prime mailing list
[email protected]
http://hogranch.com/mailman/listinfo/prime

Reply via email to