Commit ee997ba7 authored by valenok's avatar valenok

put back dynamic SSL lib loading

parent 4f716e2b
...@@ -22,8 +22,7 @@ all: ...@@ -22,8 +22,7 @@ all:
CFLAGS= -W -Wall -std=c99 -pedantic -Os -fomit-frame-pointer $(COPT) CFLAGS= -W -Wall -std=c99 -pedantic -Os -fomit-frame-pointer $(COPT)
MAC_SHARED= -flat_namespace -bundle -undefined suppress MAC_SHARED= -flat_namespace -bundle -undefined suppress
SSLFLAGS= -lssl -lcrypto LINFLAGS= -ldl -pthread $(CFLAGS)
LINFLAGS= -ldl -pthread $(SSLFLAGS) $(CFLAGS)
LIB= _$(PROG).so LIB= _$(PROG).so
linux: linux:
...@@ -32,17 +31,16 @@ linux: ...@@ -32,17 +31,16 @@ linux:
bsd: bsd:
$(CC) $(CFLAGS) mongoose.c -shared -pthread -fpic -fPIC -o $(LIB) $(CC) $(CFLAGS) mongoose.c -shared -pthread -fpic -fPIC -o $(LIB)
$(CC) $(CFLAGS) mongoose.c main.c -pthread $(SSLFLAGS) -o $(PROG) $(CC) $(CFLAGS) mongoose.c main.c -pthread -o $(PROG)
mac: mac:
$(CC) $(CFLAGS) $(MAC_SHARED) mongoose.c -pthread $(SSLFLAGS) -o $(LIB) $(CC) $(CFLAGS) $(MAC_SHARED) mongoose.c -pthread -o $(LIB)
$(CC) $(CFLAGS) mongoose.c main.c -pthread $(SSLFLAGS) -o $(PROG) $(CC) $(CFLAGS) mongoose.c main.c -pthread -o $(PROG)
solaris: solaris:
gcc $(CFLAGS) mongoose.c -pthread -lnsl \ gcc $(CFLAGS) mongoose.c -pthread -lnsl \
-lsocket $(SSLFLAGS) -fpic -fPIC -shared -o $(LIB) -lsocket -fpic -fPIC -shared -o $(LIB)
gcc $(CFLAGS) mongoose.c main.c -pthread -lnsl -lsocket $(SSLFLAGS) \ gcc $(CFLAGS) mongoose.c main.c -pthread -lnsl -lsocket -o $(PROG)
-o $(PROG)
########################################################################## ##########################################################################
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment