From patchwork Thu Jul 21 12:36:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandros Frantzis X-Patchwork-Id: 2946 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0386023F4D for ; Thu, 21 Jul 2011 12:42:35 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id C1BACA18287 for ; Thu, 21 Jul 2011 12:42:34 +0000 (UTC) Received: by mail-qy0-f180.google.com with SMTP id 30so845420qyk.11 for ; Thu, 21 Jul 2011 05:42:34 -0700 (PDT) Received: by 10.229.217.3 with SMTP id hk3mr208665qcb.38.1311252153369; Thu, 21 Jul 2011 05:42:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs139502qcb; Thu, 21 Jul 2011 05:42:33 -0700 (PDT) Received: by 10.216.160.68 with SMTP id t46mr204510wek.5.1311251794825; Thu, 21 Jul 2011 05:36:34 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id j4si2371563wed.124.2011.07.21.05.36.34; Thu, 21 Jul 2011 05:36:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QjsUS-0000DN-Nw for ; Thu, 21 Jul 2011 12:36:33 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E056D2E895A for ; Thu, 21 Jul 2011 12:36:30 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 14 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 14: Improve Makefile. Message-Id: <20110721123630.17019.79036.launchpad@loganberry.canonical.com> Date: Thu, 21 Jul 2011 12:36:30 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13475"; Instance="initZopeless config overlay" X-Launchpad-Hash: 67afcb1a7ba43cc0a86087f25765d2890c61fb32 ------------------------------------------------------------ revno: 14 committer: Alexandros Frantzis timestamp: Thu 2010-07-08 13:29:59 +0300 message: Improve Makefile. Add support for installing the data files to arbitrary locations. removed: makefile added: Makefile modified: scenebuild.cpp sceneshading.cpp scenetexture.cpp --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === added file 'Makefile' --- Makefile 1970-01-01 00:00:00 +0000 +++ Makefile 2010-07-08 10:29:59 +0000 @@ -0,0 +1,24 @@ +INSTALL = install -D +INSTALL_DATA = $(INSTALL) -m644 + +PKG_DEPS = sdl gl glu +PKG_LIBS = $(shell pkg-config --libs $(PKG_DEPS)) +PKG_CFLAGS = $(shell pkg-config --cflags $(PKG_DEPS)) + +ALL_CFLAGS = -Wall -g -O2 $(CFLAGS) $(PKG_CFLAGS) +ALL_DEFINES = -DGLMARK_DATA_PATH=\"$(GLMARK_DATA_PATH)\" $(DEFINES) + +SRCS = $(wildcard *.cpp) +OBJS = $(SRCS:.cpp=.o) + +.cpp.o: + $(CXX) $(ALL_CFLAGS) $(ALL_DEFINES) -c $< -o $@ + +glmark: $(OBJS) + $(CXX) -o glmark $(LDFLAGS) $(PKG_LIBS) $(OBJS) + +install: glmark + $(INSTALL) glmark $(DESTDIR)/usr/bin/glmark + +clean: + -rm glmark $(OBJS) === removed file 'makefile' --- makefile 2010-07-07 12:33:49 +0000 +++ makefile 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -all: - g++ *.cpp -o glmark -Wall -lSDL -lGL -lGLU === modified file 'scenebuild.cpp' --- scenebuild.cpp 2010-07-07 12:38:01 +0000 +++ scenebuild.cpp 2010-07-08 10:29:59 +0000 @@ -4,7 +4,7 @@ { Model model; - if(!model.load_3ds("data/models/horse.3ds")) + if(!model.load_3ds(GLMARK_DATA_PATH"data/models/horse.3ds")) return 0; model.calculate_normals(); === modified file 'sceneshading.cpp' --- sceneshading.cpp 2010-07-08 09:13:59 +0000 +++ sceneshading.cpp 2010-07-08 10:29:59 +0000 @@ -8,7 +8,7 @@ { Model model; - if(!model.load_3ds("data/models/cat.3ds")) + if(!model.load_3ds(GLMARK_DATA_PATH"data/models/cat.3ds")) return 0; model.calculate_normals(); @@ -16,8 +16,10 @@ mMesh.build_vbo(); - mShader[0].load("data/shaders/light-basic.vert", "data/shaders/light-basic.frag"); - mShader[1].load("data/shaders/light-advanced.vert", "data/shaders/light-advanced.frag"); + mShader[0].load(GLMARK_DATA_PATH"data/shaders/light-basic.vert", + GLMARK_DATA_PATH"data/shaders/light-basic.frag"); + mShader[1].load(GLMARK_DATA_PATH"data/shaders/light-advanced.vert", + GLMARK_DATA_PATH"data/shaders/light-advanced.frag"); mRotationSpeed = 36.0f; mRotation = 0.0f; === modified file 'scenetexture.cpp' --- scenetexture.cpp 2010-07-08 08:18:12 +0000 +++ scenetexture.cpp 2010-07-08 10:29:59 +0000 @@ -10,10 +10,10 @@ { Model model; - if(!model.load_3ds("data/models/cube.3ds")) + if(!model.load_3ds(GLMARK_DATA_PATH"data/models/cube.3ds")) return 0; - if(!load_texture("data/textures/crate-base.bmp", mTexture)) + if(!load_texture(GLMARK_DATA_PATH"data/textures/crate-base.bmp", mTexture)) return 0; model.calculate_normals();