Create your first Makefile.
Requirements:
- name of the executable:
school
- rules:
all
- The
all
rule builds your executable
- The
- variables: none
Requirements:
- name of the executable:
school
- rules:
all
- The
all
rule builds your executable
- The
- variables:
CC
,SRC
CC
: the compiler to be usedSRC
: the ``.c` files
Create your first useful Makefile.
Requirements:
- name of the executable:
school
- rules:
all
- The
all
rule builds your executable
- The
- variables:
CC
,SRC
,OBJ
,NAME
CC
: the compiler to be usedSRC
: the.c
filesOBJ
: the.o
filesNAME
: the name of the executable
- The
all
rule should recompile only the updated source files - You are not allowed to have a list of all the
.o
files
Requirements:
- name of the executable:
school
- rules:
all
,clean
,oclean
,fclean
,re
all
: builds your executableclean
: deletes all Emacs and Vim temporary files along with the executableoclean
: deletes the object filesfclean
: deletes all Emacs and Vim temporary files, the executable, and the object filesre
: forces recompilation of all source files
- variables:
CC
,SRC
,OBJ
,NAME
,RM
CC
: the compiler to be usedSRC
: the.c
filesOBJ
: the.o
filesNAME
: the name of the executableRM
: the program to delete files
- The
all
rule should recompile only the updated source files - The
clean
,oclean
,fclean
,re
rules should never fail - You are not allowed to have a list of all the
.o
files
Requirements:
- name of the executable:
school
- rules:
all
,clean
,fclean
,oclean
,re
all
: builds your executableclean
: deletes all Emacs and Vim temporary files along with the executableoclean
: deletes the object filesfclean
: deletes all Emacs and Vim temporary files, the executable, and the object filesre
: forces recompilation of all source files
- variables:
CC
,SRC
,OBJ
,NAME
,RM
,CFLAGS
CC
: the compiler to be usedSRC
: the.c
filesOBJ
: the.o
filesNAME
: the name of the executableRM
: the program to delete filesCFLAGS
: your favorite compiler flags:-Wall -Werror -Wextra -pedantic
- The
all
rule should recompile only the updated source files - The
clean
,oclean
,fclean
,re
rules should never fail - You are not allowed to have a list of all the
.o
files
Task removed before I could copy the instruction.
Requirements:
- name of the executable:
school
- rules:
all
,clean
,fclean
,oclean
,re
all
: builds your executableclean
: deletes all Emacs and Vim temporary files along with the executableoclean
: deletes the object filesfclean
: deletes all Emacs and Vim temporary files, the executable, and the object filesre
: forces recompilation of all source files
- variables:
CC
,SRC
,OBJ
,NAME
,RM
,CFLAGS
CC
: the compiler to be usedSRC
: the.c
filesOBJ
: the.o
filesNAME
: the name of the executableRM
: the program to delete filesCFLAGS
: your favorite compiler flags:-Wall -Werror -Wextra -pedantic
- The
all
rule should recompile only the updated source files - The
clean
,oclean
,fclean
,re
rules should never fail - You are not allowed to have a list of all the
.o
files - You have to use
$(RM)
for the cleaning up rules, but you are not allowed to set the RM variable - You are not allowed to use the string
$(CC)
more than once in your Makefile - You are only allowed to use the string
$(RM)
twice in your Makefile - You are not allowed to use the string
$(CFLAGS)
(but the compiler should still use the flags you set in this variable) - You are not allowed to have an
$(OBJ)
rule - You are not allowed to use the
%.o: %.c
rule - Your Makefile should work even if there is a file in the folder that has the same name as one of your rule
- Your Makefile should not compile if the header file
m.h
is missing