new file structure according to subject
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
NAME = Colleen
|
||||
SRCS = Colleen.c
|
||||
CLONE = $(NAME)_kid.c
|
||||
CREATE_CLONE = ./$(NAME) > $(CLONE)
|
||||
CLONES = $(NAME)_kid.c
|
||||
CREATE_CLONE = ./$(NAME) > $(CLONES)
|
||||
|
||||
include ../MakefileCommon
|
||||
@@ -1,6 +1,6 @@
|
||||
NAME = Grace
|
||||
SRCS = Grace.c
|
||||
CLONE = $(NAME)_kid.c
|
||||
CLONES = $(NAME)_kid.c
|
||||
CREATE_CLONE = ./$(NAME)
|
||||
|
||||
include ../MakefileCommon
|
||||
@@ -1,6 +1,6 @@
|
||||
NAME = Sully
|
||||
SRCS = Sully.c
|
||||
CLONE = Sully_4.c \
|
||||
CLONES = Sully_4.c \
|
||||
Sully_3.c \
|
||||
Sully_2.c \
|
||||
Sully_1.c \
|
||||
@@ -31,7 +31,8 @@ RESET = "\e[0m"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
|
||||
D_QUINES = ./1_Colleen \
|
||||
./2_Grace
|
||||
./2_Grace \
|
||||
./3_Sully
|
||||
|
||||
RULE = all
|
||||
|
||||
@@ -44,6 +45,9 @@ RULE = all
|
||||
all:
|
||||
@$(MAKE) RULE=$@ loop
|
||||
|
||||
run:
|
||||
@$(MAKE) RULE=$@ loop
|
||||
|
||||
diff:
|
||||
@$(MAKE) RULE=$@ loop
|
||||
|
||||
@@ -64,5 +68,5 @@ loop: $(D_QUINES)
|
||||
|
||||
re: fclean all
|
||||
|
||||
.PHONY : all clean fclean re loop
|
||||
.PHONY : all clean fclean re loop run diff leaks
|
||||
|
||||
@@ -33,7 +33,7 @@ RESET = "\e[0m"
|
||||
# FILES :
|
||||
#NAME -> defined in subfolder makefiles
|
||||
#SRCS -> defined in subfolder makefiles
|
||||
#CLONE -> defined in subfolder makefiles
|
||||
#CLONES -> defined in subfolder makefiles
|
||||
#CREATE_CLONE -> defined in subfolder makefiles
|
||||
#RM_MORE -> might be defined in subfolder makefiles
|
||||
LIBS =
|
||||
@@ -111,13 +111,13 @@ run:
|
||||
diff: $(NAME)
|
||||
@echo $(CYAN)"compare source with output :"$(RESET)
|
||||
- diff --color $(CLONE) $(SRCS); \
|
||||
if [ $$? -eq 0 ]; then echo $(GREEN)"Files $(SRCS) and $(CLONE) are identical"$(RESET); else echo $(RED)":Files $(SRCS) and $(CLONE) differ"$(RESET); fi
|
||||
if [ $$? -eq 0 ]; then echo $(GREEN)"Files $(SRCS) and $(CLONES) are identical"$(RESET); else echo $(RED)":Files $(SRCS) and $(CLONES) differ"$(RESET); fi
|
||||
|
||||
clean:
|
||||
$(RM_OBJS)
|
||||
fclean: clean
|
||||
rm -f $(NAME)
|
||||
rm -f $(CLONE)
|
||||
rm -f $(CLONES)
|
||||
$(RM_MORE)
|
||||
|
||||
re: fclean all
|
||||
Reference in New Issue
Block a user