blob: 9e6277b62531d0660a8945eab0b50033a58d538d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
CXX = g++ -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC
LDFLAGS =
CXXFLAGS += -O3 -DNDEBUG
COMMON_OBJS = config.o fatal.o socket.o string_util.o escape.o
HSCLIENT_OBJS = $(COMMON_OBJS) hstcpcli.o
all: libhsclient.a
libhsclient.a: $(HSCLIENT_OBJS)
$(AR) rc $@ $^
$(AR) s $@
clean:
rm -f *.a *.so *.o
LIBDIR = $(shell \
if [ -e /usr/lib64/mysql ]; then echo /usr/lib64; else echo /usr/lib; fi)
install: libhsclient.a
sudo sh -c 'cp libhsclient.a libhsclient.a.cpy && \
mv libhsclient.a.cpy $(LIBDIR)/libhsclient.a && \
mkdir -p /usr/include/handlersocket && \
cp -a *.hpp /usr/include/handlersocket/'
|