-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
executable file
·54 lines (35 loc) · 1.12 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: clean mrproper all
AR= ar
CXX= g++
#Carpetas
INC= include
SRC= src
OBJ= obj
BIN= bin
LIB= lib
CXXFLAGS= -Wall -g -I./include
LDFLAGS= -L./lib
LDLIBS= -lpartida
all : $(BIN)/conectaN
clean :
echo "Limpiando..."
-rm $(OBJ)/*.o $(LIB)/*.a
mrproper : clean
-rm $(BIN)/conectaN ./*.conf ./doc/html/*
documentacion:
doxygen doc/doxys/Doxyfile
#Archivos Objeto
$(OBJ)/tablero.o : $(INC)/matriz.h $(INC)/tablero.h $(SRC)/tablero.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $(SRC)/tablero.cpp
$(OBJ)/matriz.o : $(INC)/matriz.h $(SRC)/matriz.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $(SRC)/matriz.cpp
$(OBJ)/jugador.o : $(INC)/player.h $(INC)/tablero.h $(SRC)/player.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $(SRC)/player.cpp
$(OBJ)/conectaN.o : $(INC)/matriz.h $(INC)/tablero.h $(INC)/player.h $(SRC)/conectaN.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $(SRC)/conectaN.cpp
# Mains
$(BIN)/conectaN : $(OBJ)/conectaN.o $(LIB)/libpartida.a
$(CXX) $(CXXFLAGS) -o $@ $(OBJ)/conectaN.o $(LDFLAGS) $(LDLIBS)
# Librerias
$(LIB)/libpartida.a : $(OBJ)/tablero.o $(OBJ)/jugador.o $(OBJ)/matriz.o
$(AR) rvs $@ $(OBJ)/tablero.o $(OBJ)/jugador.o $(OBJ)/matriz.o