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