Skip to content

Commit 36095cf

Browse files
committed
Updated readme
1 parent cf0576c commit 36095cf

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
# https://github.com/kala13x/smake #
44
####################################
55

6-
CFLAGS = -g -O2 -Wall -D_XUTILS_DEBUG -D_XUTILS_USE_GNU -D_ASSERT_TIMED -D_XUTILS_USE_SSL
6+
CFLAGS = -g -O2 -Wall -D_XUTILS_DEBUG -D_XUTILS_USE_GNU -D_ASSERT_TIMED
77
CFLAGS += -I./src/crypt -I./src/data -I./src/net -I./src/sys -I./src
8-
LIBS = -lpthread -lssl -lcrypto
98
NAME = libxutils.a
9+
LIBS = -lpthread
1010
ODIR = ./build
1111
OBJ = o
1212

13+
ifeq ($(XUTILS_USE_SSL),y)
14+
CFLAGS += -D_XUTILS_USE_SSL
15+
LIBS += -lssl -lcrypto
16+
endif
17+
1318
OBJS = addr.$(OBJ) \
1419
aes.$(OBJ) \
1520
api.$(OBJ) \

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,13 @@ sudo make install
110110

111111
### Dependencies
112112
The only dependency that the library uses is the `openssl-devel` package for the `SSL` and `RSA` implementations.\
113-
You can either install the `openssl-devel` package or disable the `SSL` support in the library.
113+
If `openssl` package is not installed on the system, the lib will automatically be compiled without `SSL` support.
114114

115115
#### Install OpenSSL development package
116116
Red-Hat family: `sudo dnf install openssl-devel`\
117-
Debian family: `sudo apt-get install libssl-dev`
118-
119-
#### Disable SSL support in the library
120-
If you use the `cmake`, `smake` or `build.sh` script for building the project, you do not need to disable anything manually,\
121-
the it will be automatically disabled if the OpenSSL library is not installed in the system.
122-
123-
If you use raw `Makefile` to build the project, all you need to adjust `CFLAGS` and `LIBS` in `Makefile`.
124-
- Remove `-D_XUTILS_USE_SSL` entry from the `CFLAGS`.
125-
- Remove `-lssl` and `-lcrypto` entries from the `LIBS`.
117+
Debian family: `sudo apt-get install libssl-dev`\
118+
Windows: `choco install openssl`\
119+
MacOS: `brew install openssl`
126120

127121
### Usage
128122
Just include the required `<xutils/*.h>` header files in your source code and use `-lxutils`\

0 commit comments

Comments
 (0)