Some suggestions (assuming you are using GNU make , not something else)
First run make -p once, you will realize that you know the built-in rules of make . Take a look in particular at COMPILE.c and LINK.c
Then i suggest
CFLAGS= -g -Wall -I.
(because you really want -g to debug and -Wall get most warnings)
And you probably don't need
$(EXECUTABLE): $(OBJ) gcc -o $@ $^ $(CFLAGS)
However, I suggest adding before most other rules
.PHONY: all clean all: $(EXECUTABLES)
Actually, I would encode your Makefile (for GNU make !), As follows
# file Makefile CC= gcc RM= rm -vf CFLAGS= -Wall -g CPPFLAGS= -I. SRCFILES= ex1.c ex2.c ## or perhaps $(wildcard *.c) OBJFILES= $(patsubst %.c, %.o, $(SRCFILES)) PROGFILES= $(patsubst %.c, %, $(SRCFILES)) .PHONY: all clean all: $(PROGFILES) clean: $(RM) $(OBJFILES) $(PROGFILES) *~ ## eof Makefile
Remember that tab is a significant character in Makefile -s (part of the rules action). In this answer, lines starting with four spaces should at least begin with a tab character.
Once everything is debugged, run make clean to clean everything, and then make -j CFLAGS=-O2 all to compile everything with optimization.
Finally, I recommend using remake and running remake -x to debug the Makefile -s complex
Of course, I assume that your directory has only single-file programs.
By the way, there are other software developers. You might consider omake
Remember to use a version control system like git for your source files. It's time to also learn such a tool.