This repository has been archived by the owner on Oct 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (47 loc) · 1.84 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
54
55
56
57
58
59
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: pguthaus <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/11/06 15:01:06 by pguthaus #+# #+# #
# Updated: 2019/03/25 16:16:38 by pguthaus ### ########.fr #
# #
# **************************************************************************** #
include make/config.mk
PRODFILE = make/Makefile.prod
DEVFILE = make/Makefile.dev
all: lib
lib:
@echo "Making the static library..."
@$(MAKE) -f $(PRODFILE)
@echo "Static library has been created"
dev:
@echo "Making the debugable static library..."
@$(MAKE) -f $(DEVFILE)
@echo "Debugable static library has been made"
devre: fclean dev
re: fclean lib
test:
@echo "Running tests..."
@$(MAKE) -f $(PRODFILE) test
devtest:
@echo "Running debugable tests..."
@$(MAKE) -f $(DEVFILE) test
clean:
@echo "Cleaning object files"
@$(MAKE) -f $(PRODFILE) clean
@$(MAKE) -f $(DEVFILE) clean
@rm -rf objs/
fclean: clean
@echo "Cleaning everything"
@$(MAKE) -f $(PRODFILE) fclean
@$(MAKE) -f $(DEVFILE) fclean
getsources:
@rm -f $(SOURCEMAP)
@rm -f $(TESTSOURCEMAP)
@touch $(SOURCEMAP)
@touch $(TESTSOURCEMAP)
@find src/ -name "*.c" | sed "s/src\//FT_SRCS+=/g" >> $(SOURCEMAP)
@find tests/src/ -name "*.c" | sed "s/tests\/src\//FT_TEST_SRCS+=/g" >> $(TESTSOURCEMAP)