-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (25 loc) · 818 Bytes
/
Makefile
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
CC = g++
CFLAGS = -Wall -g -Wpedantic -Wno-sign-compare -std=c++14
LIBFLAGS = -lmariadbcpp
MANEJADORES = src/manejadores/manejador_
MENSAJES = src/manejadores/mensajes.cpp
# UTILS = src/utils/read_file.cpp
UTILS =
DEPS_C = $(MANEJADORES)C.cpp $(MENSAJES)
DEPS_S = $(MANEJADORES)S.cpp $(MENSAJES) $(UTILS)
SERVER_BIN = socketServer
CLIENT_BIN = socketClient
WINFLAGS =
ifeq ($(OS),Windows_NT)
CFLAGS += -D WIN32
WINFLAGS+= -lws2_32
endif
all:
$(CC) $(CFLAGS) src/sockets/$(CLIENT_BIN).cpp $(DEPS_C) $^ -o cliente
$(CC) $(CFLAGS) src/sockets/$(SERVER_BIN).cpp $(DEPS_S) $(LIBFLAGS) $^ -o server
cliente:
$(CC) $(CFLAGS) src/sockets/$(CLIENT_BIN).cpp $(DEPS_C) $(WINFLAGS) $^ -o $@
server:
$(CC) $(CFLAGS) src/sockets/$(SERVER_BIN).cpp $(DEPS_S) $(LIBFLAGS) $(WINFLAGS) $^ -o $@
clean:
rm server cliente