You are on page 1of 1

make file :

fact.exe: fact func.o main-fun.o


gcc fc=act func.o main func.o -o fact.exe

fact-func.o : factfunc.c fact-func.h


gcc - c fact func.c -o fact func.o

main-func. : main

----------------------------------------------------------------------

the make compares the time steps of the files


the make file executes the given commands !

ll command fo time step


vim func-fact.c ??

vim Makefile command !

----------------------------------------------------------------------------

global variables in projects :

we cannot have two global variables with the same name !

add extern keyword to the global vaiable declaration ! when it is located in the
fucntion file
extern debug = 1;

or add it to the header file ! just a declaration then we set it n the main file !

------------------------------------------

conditional compilation directing:

it is used when

add compilation directing :


#ifdef ITIRATIVE // preprocessor direective
#else
#endif

add eteritaive in the make file command to excecute the recusion

You might also like