X-Git-Url: https://git.ralfj.de/gltest.git/blobdiff_plain/b4dc0596570275aa9def5ff63af951beb8473d58..ce1b46da645fdcac80fc9c71082bb5cb40166576:/Makefile?ds=sidebyside diff --git a/Makefile b/Makefile index c848639..c69fff7 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,38 @@ -FLAGS := -Wall -g -O1 +CFLAGS := -Wall -g -O1 COMMON_SRC = gltest.cpp glwindow.cpp COMMON_HDR = glwindow.h glutil.h +COMMON_LD = -lX11 -lboost_program_options -BINARIES := glxtest egltest glestest eglinfo +BINARIES := glxtest egltest glx2test egl2test glx3test gles2test eglinfo all: $(BINARIES) # choices (not all combinations are valid) -# windowing system WIN_{GLX,EGL} -# the kind of context CON_{GL1,GLES2} +# windowing system: WIN_{GLX,EGL} +# the kind of context: CON_{GL1,GL3,GLES2} +# the API used to draw: compile in glutil_gl1.cpp or glutil_gl2.cpp 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 + g++ $(CFLAGS) -DWIN_GLX -DCON_GL1 $^ -lGL $(COMMON_LD) -o $@ 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 + g++ $(CFLAGS) -DWIN_EGL -DCON_GL1 $^ -lEGL -lGL $(COMMON_LD) -o $@ -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 +glx2test: $(COMMON_SRC) $(COMMON_HDR) glutil_gl2.cpp glxbackend.cpp glxbackend.h + g++ $(CFLAGS) -DWIN_GLX -DCON_GL1 $^ -lGL $(COMMON_LD) -o $@ + +egl2test: $(COMMON_SRC) $(COMMON_HDR) glutil_gl2.cpp eglbackend.cpp eglbackend.h + g++ $(CFLAGS) -DWIN_EGL -DCON_GL1 $^ -lEGL -lGL $(COMMON_LD) -o $@ + +glx3test: $(COMMON_SRC) $(COMMON_HDR) glutil_gl2.cpp glxbackend.cpp glxbackend.h + g++ $(CFLAGS) -DWIN_GLX -DCON_GL3 $^ -lGL $(COMMON_LD) -o $@ + +gles2test: $(COMMON_SRC) $(COMMON_HDR) glutil_gl2.cpp eglbackend.cpp eglbackend.h + g++ $(CFLAGS) -DWIN_EGL -DCON_GLES2 $^ -lEGL -lGLESv2 $(COMMON_LD) -o $@ eglinfo: eglinfo.c - gcc $(FLAGS) eglinfo.c -lEGL -lGL -lX11 -o eglinfo + gcc $(CFLAGS) $^ -lEGL -lGL -lX11 -o $@ clean: rm -f $(BINARIES)