adding gui_cflags to Makefiles
authorJavier S. Pedro <maemo@javispedro.com>
Mon, 7 Sep 2009 14:02:30 +0000 (16:02 +0200)
committerJavier S. Pedro <maemo@javispedro.com>
Mon, 7 Sep 2009 14:02:30 +0000 (16:02 +0200)
debian/rules
gui/Makefile

index f736176..25ed292 100755 (executable)
@@ -22,7 +22,6 @@ GAME_VERSION := $(shell head -n 1 debian/changelog | sed 's/[^0-9.-]//g')
 
 CFLAGS = -Wall -g -DMAEMO -DMAEMO_VERSION=$(MAEMO_VERSION)
 LDFLAGS = -Wl,-z,defs
-CONFOPTS = 
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -34,7 +33,7 @@ else ifneq (,$(findstring arm,$(DEB_BUILD_GNU_TYPE)))
        # Fixes hang while exiting on Diablo.
        CFLAGS += -static-libgcc
 else # x86
-       crash
+       crash ## Cannot build in x86
 endif
 
 configure: configure-stamp
@@ -50,7 +49,7 @@ build: build-stamp
 build-stamp: configure-stamp 
        dh_testdir
 
-       $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" GAME_VERSION="$(GAME_VERSION)"
+       $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" GAME_VERSION="$(GAME_VERSION)"
 
        touch $@
 
index 07db338..cd7473e 100644 (file)
@@ -1,9 +1,17 @@
 PKGS:=gtk+-2.0 hildon-1 hildon-fm-2 gconf-2.0 gnome-vfs-2.0
 CPPFLAGS:=$(shell pkg-config --cflags $(PKGS)) 
-CFLAGS?=-g -Os -Wall
-CFLAGS+=-fpic -shared
 LDLIBS:=$(shell pkg-config --libs $(PKGS))
-LDFLAGS:=-export-dynamic -avoid-version -module -shared -Wl,-z,defs
+
+ifdef GUI_CFLAGS
+       override CFLAGS:=$(GUI_CFLAGS)
+else
+       override CFLAGS:= -g -Os -Wall -fpic -shared -DMAEMO
+endif
+ifdef GUI_LDFLAGS
+       override LDFLAGS:=$(GUI_LDFLAGS)
+else
+       override LDFLAGS:= -export-dynamic -avoid-version -module -shared -Wl,-z,defs
+endif
 
 #GAME_VERSION
 GAME_SHARE_PATH=/usr/share/games/drnoksnes