The problem is that you hard code your compiler then ask travis to build against two compilers. This means that travis will try to build your code with gcc then again with clang. You have two options remove clang as a compiler from your .travis.yml
or change your makefile to be compiler agnostic. To change you makefile just replace all instances of gcc with $(CC)
Also $PATH
contains the locations to look in for executables. If you overwrite it make can't find anything. so you need to rename $PATH to something like example_path
eg
# Variables
MESA = /usr/bin/Mesa-5.0
example_path = examples/environment/
EXAMPLE_ENVIRONMENT = examples/environment/main.c
INCPATH = -I$(MESA)/include
LIBPATH = -L$(MESA)/lib
LIBS = -lglut -lGLU -lGL -lm
CFLAGS = $(INCPATH) -g
LFLAGS = $(LIBPATH) $(LIBS)
# Main targets
all: main.o
$(CC) -o $(example_path)/main.o $(LFLAGS)
# Source targets
main.o: $(EXAMPLE_ENVIRONMENT)
$(CC) -c -pendantic $(EXAMPLE_ENVIRONMENT) $(CFLAGS)
You will also need to add a before_install section to your .travis.yml
file to install Mesa as the travis images are very minimal.