1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 TARGET_GL = ../gl_APICheck 6 TARGET_ES = ../gles_APICheck 7 8 ifeq ($(GRAPHICS_BACKEND), OPENGLES) 9 LDFLAGS = -lX11 -lm -ldl 10 SRCS = gles_APICheck.cc 11 TARGET = $(TARGET_ES) 12 else ifeq ($(GRAPHICS_BACKEND), OPENGL) 13 LDFLAGS = -lX11 -lm -lGL 14 SRCS = gl_APICheck.cc 15 TARGET = $(TARGET_GL) 16 else 17 $(error GRAPHICS_BACKEND has to be either OPENGL or OPENGLES) 18 endif 19 20 all: $(TARGET) 21 22 $(TARGET): $(SRCS) 23 $(CXX) -O3 -o $@ $^ -Wall $(LDFLAGS) 24 25 clean: 26 $(RM) $(TARGET_GL) 27 $(RM) $(TARGET_ES) 28