-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.1 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
# Makefile principal
# Directorios
LIBS_DIR := libs
CONTROLLERS_DIR := controllers
# Objetivo por defecto
all: libs controllers
# Compilar todas las carpetas en 'libs'
libs:
@for dir in $(wildcard $(LIBS_DIR)/*); do \
if [ -f $$dir/Makefile ]; then \
echo "Compiling $$dir..."; \
$(MAKE) -C $$dir; \
echo ""; \
fi; \
done
# Compilar todas las carpetas en 'controllers'
controllers:
@for dir in $(wildcard $(CONTROLLERS_DIR)/*); do \
if [ -f $$dir/Makefile ]; then \
echo "Compiling $$dir..."; \
$(MAKE) -C $$dir; \
echo ""; \
fi; \
done
# Limpiar todos los directorios
clean:
@for dir in $(wildcard $(LIBS_DIR)/*); do \
if [ -f $$dir/Makefile ]; then \
echo "Cleaning $$dir..."; \
$(MAKE) -C $$dir clean; \
echo ""; \
fi; \
done
@for dir in $(wildcard $(CONTROLLERS_DIR)/*); do \
if [ -f $$dir/Makefile ]; then \
echo "Cleaning $$dir..."; \
$(MAKE) -C $$dir clean; \
echo ""; \
fi; \
done
.PHONY: all libs controllers clean