-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.old
96 lines (68 loc) · 1.73 KB
/
Makefile.old
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
##
## Makefile for Makefile in
##
## Made by Moghrabi Alexandre
## Login <[email protected]>
##
## Started on Fri Jun 6 11:16:50 2014 Moghrabi Alexandre
## Last update Sat Dec 6 06:28:18 2014 Moghrabi Alexandre
##
NAME= mognetwork
LIBNAME=lib$(NAME).so
INCLIB= $(NAME)
ALIBNAME=lib$(NAME).a
BINDIR=./bin/
SRCDIR= ./src/
INCDIR= ./include/
SRC= $(SRCDIR)CondVar.cpp \
$(SRCDIR)IpAddress.cpp \
$(SRCDIR)WinMutex.cpp \
$(SRCDIR)UnixMutex.cpp \
$(SRCDIR)Selector.cpp \
$(SRCDIR)Socket.cpp \
$(SRCDIR)TcpASIODatas.cpp \
$(SRCDIR)TcpASIOListener.cpp \
$(SRCDIR)TcpASIOWriter.cpp \
$(SRCDIR)TcpSocket.cpp \
$(SRCDIR)UnixThread.cpp \
$(SRCDIR)UnixSocket.cpp \
$(SRCDIR)WinSocket.cpp \
$(SRCDIR)TcpServerSocket.cpp \
$(SRCDIR)TcpASIOServer.cpp \
$(SRCDIR)Packet.cpp
OBJS= $(SRC:.cpp=.o)
RM= rm -rf
CXX= g++
AR= ar rs
CP= cp -rf
CXXFLAGS= -Wall -Werror -Wextra -I $(INCDIR) -ansi -pedantic -fPIC
LDFLAGS=
all: shared static
$(BINDIR)$(LIBNAME): $(OBJS)
mkdir -p bin
$(CXX) --shared -o $(BINDIR)$(LIBNAME) $(LDFLAGS) $(OBJS)
$(BINDIR)$(ALIBNAME): $(OBJS)
mkdir -p bin
$(AR) $(BINDIR)$(ALIBNAME) $(LDFLAGS) $(OBJS)
debug-shared: CXXFLAGS += -g3
debug-shared: shared
debug-static: CXXFLAGS += -g3
debug-static: static
static: $(BINDIR)$(ALIBNAME)
shared: $(BINDIR)$(LIBNAME)
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(BINDIR)$(LIBNAME)
$(RM) $(BINDIR)$(ALIBNAME)
re: fclean all
install:
$(CP) $(BINDIR)$(LIBNAME) /usr/local/lib/
mkdir -p /usr/local/include/$(NAME)
$(CP) $(INCDIR)/* /usr/local/include/$(NAME)/
ldconfig
uninstall:
$(RM) /usr/local/lib/$(LIBNAME)
$(RM) /usr/local/include/$(NAME)
ldconfig
.PHONY: all debug-static debug-shared clean fclean re static shared install uninstall