-egltest: $(COMMON_SRC) $(COMMON_HDR) eglbackend.cpp eglbackend.h
- g++ $(FLAGS) -DUSE_EGL $(COMMON_SRC) eglbackend.cpp -lEGL -lGL -lX11 -lboost_program_options -o egltest
+# choices (not all combinations are valid)
+# windowing system WIN_{GLX,EGL}
+# the kind of context CON_{GL1,GLES2}
+
+glxtest: $(COMMON_SRC) $(COMMON_HDR) glutil_gl1.cpp glxbackend.cpp glxbackend.h
+ g++ $(FLAGS) -DWIN_GLX -DCON_GL1 $(COMMON_SRC) glutil_gl1.cpp glxbackend.cpp -lGL -lX11 -lboost_program_options -o glxtest
+
+egltest: $(COMMON_SRC) $(COMMON_HDR) glutil_gl1.cpp eglbackend.cpp eglbackend.h
+ g++ $(FLAGS) -DWIN_EGL -DCON_GL1 $(COMMON_SRC) glutil_gl1.cpp eglbackend.cpp -lEGL -lGL -lX11 -lboost_program_options -o egltest
+
+glestest: $(COMMON_SRC) $(COMMON_HDR) glutil_gl2.cpp eglbackend.cpp eglbackend.h
+ g++ $(FLAGS) -DWIN_EGL -DCON_GLES2 $(COMMON_SRC) glutil_gl2.cpp eglbackend.cpp -lEGL -lGLESv2 -lX11 -lboost_program_options -o glestest