## The makefile used to create the convert program ## to compile simply type "make" ## to remove all object files and executables type "make clean" ## convert has 2 dependencies main.o and function.o convert: main.o function.o ## use the gcc compiler to link main.o and function.o object files to an executable called convert gcc main.o function.o -o convert ## function.o has 2 dependencies function.c and function.h function.o: function.c function.h ## use gcc with the -c option to compile function.c to object code gcc -c function.c ## main.o has 1 dependency main.c main.o: main.c ## use gcc with the -c option to compile main.c to object code gcc -c main.c ## this is just a label so we can automate certain shell tasks (like removing files) ## clean is the standard way of doing this, but we could name it anything we wanted to clean: ## use the remove command to remove the object files and the convert executable rm -rf convert main.o function.o