wip makefil diff
This commit is contained in:
BIN
2_Grace/Grace
Executable file
BIN
2_Grace/Grace
Executable file
Binary file not shown.
13
2_Grace/Grace.c
Normal file
13
2_Grace/Grace.c
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/*comment outside*/
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
char *second_function() {
|
||||||
|
return "/*comment outside*/%c#include <stdio.h>%c%cchar *second_function() {%c return %c%s%c;%c}%c%cint main() {%c /*comment inside*/%c char *program = second_function();%c printf(program, 10, 10, 10, 10, 34, program, 34, 10, 10, 10, 10, 10, 10, 10, 10, 10);%c return 0;%c}%c";
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
/*comment inside*/
|
||||||
|
char *program = second_function();
|
||||||
|
printf(program, 10, 10, 10, 10, 34, program, 34, 10, 10, 10, 10, 10, 10, 10, 10, 10);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
111
2_Grace/Makefile
Normal file
111
2_Grace/Makefile
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
# - - - - - - #
|
||||||
|
# #
|
||||||
|
# COLORS #
|
||||||
|
# #
|
||||||
|
# - - - - - - #
|
||||||
|
|
||||||
|
GRAY = "\e[0;30m"
|
||||||
|
RED = "\e[0;31m"
|
||||||
|
GREEN = "\e[0;32m"
|
||||||
|
YELLOW = "\e[0;33m"
|
||||||
|
BLUE = "\e[0;34m"
|
||||||
|
PURPLE = "\e[0;35m"
|
||||||
|
CYAN = "\e[0;36m"
|
||||||
|
WHITE = "\e[0;37m"
|
||||||
|
|
||||||
|
B_GRAY = "\e[1;30m"
|
||||||
|
B_RED = "\e[1;31m"
|
||||||
|
B_GREEN = "\e[1;32m"
|
||||||
|
B_YELLOW = "\e[1;33m"
|
||||||
|
B_BLUE = "\e[1;34m"
|
||||||
|
B_PURPLE = "\e[1;35m"
|
||||||
|
B_CYAN = "\e[1;36m"
|
||||||
|
B_WHITE = "\e[1;37m"
|
||||||
|
|
||||||
|
RESET = "\e[0m"
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
# . name = value \ . += append to a variable #
|
||||||
|
# VARIABLES . value . != set result of command #
|
||||||
|
# . name is case sensitive . ?= set if not already set #
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
|
||||||
|
|
||||||
|
NAME = Grace
|
||||||
|
|
||||||
|
CC = clang
|
||||||
|
EXT = c
|
||||||
|
|
||||||
|
CFLAGS = -Wall -Wextra -Werror $(INCLUDES)
|
||||||
|
CFLAGS += -g3
|
||||||
|
|
||||||
|
VPATH = $(D_SRCS)
|
||||||
|
|
||||||
|
LIBS =
|
||||||
|
|
||||||
|
F_INCLUDES = $(HEADERS:%=$(D_HEADERS)/%)
|
||||||
|
INCLUDES = -I$(D_HEADERS)
|
||||||
|
|
||||||
|
D_SRCS = .
|
||||||
|
SRCS = Grace.c
|
||||||
|
|
||||||
|
D_HEADERS = .
|
||||||
|
HEADERS =
|
||||||
|
|
||||||
|
D_OBJS = builds
|
||||||
|
OBJS = $(SRCS:%.$(EXT)=$(D_OBJS)/%.o)
|
||||||
|
|
||||||
|
ifeq "$(D_OBJS)" "."
|
||||||
|
RM_OBJS = rm -f $(OBJS)
|
||||||
|
else
|
||||||
|
RM_OBJS = rm -rf $(D_OBJS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
# . target: prerequisites . $@ : target #
|
||||||
|
# RULES . recipe . $< : 1st prerequisite #
|
||||||
|
# . recipe . $^ : all prerequisites #
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
|
||||||
|
all: $(NAME)
|
||||||
|
|
||||||
|
# %.$(EXT) | $(D_OBJS) -> pipe is for order-only prerequisites :
|
||||||
|
# - for each file "%.$(EXT)" :
|
||||||
|
# - if it has been modified since last time
|
||||||
|
# - execute rules on corresponding target file "$(D_OBJS)/%.o"
|
||||||
|
# - and directory "$(D_OBJS)" is order-only prerequisite :
|
||||||
|
# - it must exist before executing rule
|
||||||
|
# - but last time modification is not checked
|
||||||
|
$(D_OBJS)/%.o: %.$(EXT) | $(D_OBJS)
|
||||||
|
@echo $(CYAN)"compilation (objects.o) :"$(RESET)
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
$(D_OBJS):
|
||||||
|
mkdir $@
|
||||||
|
|
||||||
|
$(OBJS): $(F_INCLUDES)
|
||||||
|
|
||||||
|
$(NAME): $(OBJS)
|
||||||
|
@echo $(CYAN)"linkage (link objects.o) :"$(RESET)
|
||||||
|
$(CC) $(OBJS) -o $@ $(LIBS)
|
||||||
|
|
||||||
|
leaks: $(NAME)
|
||||||
|
valgrind --leak-check=full --show-leak-kinds=all ./$(NAME)
|
||||||
|
|
||||||
|
diff: $(NAME)
|
||||||
|
@echo $(CYAN)"compare source with output :"$(RESET)
|
||||||
|
./$(NAME) > tmp_$(NAME)
|
||||||
|
- diff --color --report-identical-files tmp_$(NAME) $(SRCS)
|
||||||
|
rm tmp_$(NAME)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM_OBJS)
|
||||||
|
|
||||||
|
fclean: clean
|
||||||
|
rm -f $(NAME)
|
||||||
|
|
||||||
|
re: fclean all
|
||||||
|
|
||||||
|
.PHONY : all clean fclean re
|
||||||
|
|
||||||
BIN
2_Grace/builds/Grace.o
Normal file
BIN
2_Grace/builds/Grace.o
Normal file
Binary file not shown.
9
Makefile
9
Makefile
@@ -30,7 +30,8 @@ RESET = "\e[0m"
|
|||||||
# . name is case sensitive . ?= set if not already set #
|
# . name is case sensitive . ?= set if not already set #
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
|
||||||
D_QUINES = ./1_Colleen
|
D_QUINES = ./1_Colleen \
|
||||||
|
./2_Grace
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
# . target: prerequisites . $@ : target #
|
# . target: prerequisites . $@ : target #
|
||||||
@@ -44,6 +45,12 @@ all: $(D_QUINES)
|
|||||||
$(MAKE) -C $$dir; \
|
$(MAKE) -C $$dir; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
diff: $(D_QUINES)
|
||||||
|
@for dir in $^; do \
|
||||||
|
echo $(B_CYAN)"diff $$dir"$(RESET); \
|
||||||
|
$(MAKE) diff -C $$dir; \
|
||||||
|
done
|
||||||
|
|
||||||
clean: $(D_QUINES)
|
clean: $(D_QUINES)
|
||||||
@for dir in $^; do \
|
@for dir in $^; do \
|
||||||
echo $(B_YELLOW)"clean $$dir"$(RESET); \
|
echo $(B_YELLOW)"clean $$dir"$(RESET); \
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -1,29 +1 @@
|
|||||||
# README #
|
# DR_QUINE
|
||||||
|
|
||||||
This README would normally document whatever steps are necessary to get your application up and running.
|
|
||||||
|
|
||||||
### What is this repository for? ###
|
|
||||||
|
|
||||||
* Quick summary
|
|
||||||
* Version
|
|
||||||
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
|
||||||
|
|
||||||
### How do I get set up? ###
|
|
||||||
|
|
||||||
* Summary of set up
|
|
||||||
* Configuration
|
|
||||||
* Dependencies
|
|
||||||
* Database configuration
|
|
||||||
* How to run tests
|
|
||||||
* Deployment instructions
|
|
||||||
|
|
||||||
### Contribution guidelines ###
|
|
||||||
|
|
||||||
* Writing tests
|
|
||||||
* Code review
|
|
||||||
* Other guidelines
|
|
||||||
|
|
||||||
### Who do I talk to? ###
|
|
||||||
|
|
||||||
* Repo owner or admin
|
|
||||||
* Other community or team contact
|
|
||||||
|
|||||||
Reference in New Issue
Block a user