Get CFLAGS, CPPFLAGS and LDFLAGS from dpkg-buildflags.
git-svn-id: file:///svn/pkg-games/packages/trunk/alex4@11861 8808ee5c-780a-0410-9abb-a8188df92ce5
Peter Pentchev
13 years ago
9 | 9 |
Closes: #617465
|
10 | 10 |
- put the aldumb library before the Allegro libraries that it
|
11 | 11 |
depends on
|
|
12 |
- honor CPPFLAGS, CFLAGS and LDFLAGS
|
12 | 13 |
* Convert to the 3.0 (quilt) source format.
|
13 | 14 |
* Add misc:Depends to the alex4-data package just in case.
|
14 | 15 |
* Expand the alex4-data package's long description.
|
15 | 16 |
* Bump the debhelper compatibility level to 8 and minimize the rules file
|
16 | 17 |
using debhelper override targets.
|
17 | 18 |
* Bump Standards-Version to 3.9.1 with no changes.
|
|
19 |
* Use dpkg-buildflags to obtain the default values for CPPFLAGS, CFLAGS
|
|
20 |
and LDFLAGS.
|
18 | 21 |
|
19 | 22 |
-- Peter Pentchev <roam@ringlet.net> Wed, 09 Mar 2011 14:14:04 +0200
|
20 | 23 |
|
2 | 2 |
Priority: optional
|
3 | 3 |
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
|
4 | 4 |
Uploaders: Peter De Wachter <pdewacht@gmail.com>
|
5 | |
Build-Depends: debhelper (>= 8), liballegro4.2-dev (>= 2:4.2.2-2), libdumb1-dev, libaldmb1-dev
|
|
5 |
Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.15.7~),
|
|
6 |
liballegro4.2-dev (>= 2:4.2.2-2), libdumb1-dev, libaldmb1-dev
|
6 | 7 |
Standards-Version: 3.9.1
|
7 | 8 |
Homepage: http://allegator.sourceforge.net/
|
8 | 9 |
Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/alex4/
|
450 | 450 |
@@ -0,0 +1,24 @@
|
451 | 451 |
+PREFIX = /usr/local
|
452 | 452 |
+DATADIR = $(PREFIX)/share/$(TARGET)
|
453 | |
+CFLAGS = -g -Wall -Wno-deprecated-declarations -O2
|
|
453 |
+CFLAGS ?= -g -Wall -Wno-deprecated-declarations -O2
|
454 | 454 |
+LIBS = -laldmb -ldumb `allegro-config --libs`
|
455 | 455 |
+DEFINES = -DDATADIR=\"$(DATADIR)/\"
|
456 | 456 |
+OBJS = actor.o edit.o map.o player.o shooter.o unix.o \
|
|
459 | 459 |
+TARGET = alex4
|
460 | 460 |
+
|
461 | 461 |
+$(TARGET): $(OBJS)
|
462 | |
+ $(CC) -o $@ $^ $(LIBS)
|
|
462 |
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
463 | 463 |
+
|
464 | 464 |
+%.o: %.c
|
465 | |
+ $(CC) $(CFLAGS) $(DEFINES) -o $@ -c $<
|
|
465 |
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -o $@ -c $<
|
466 | 466 |
+
|
467 | 467 |
+install: $(TARGET)
|
468 | 468 |
+ mkdir -p $(PREFIX)/bin
|
2 | 2 |
# Uncomment this to turn on verbose mode.
|
3 | 3 |
#export DH_VERBOSE=1
|
4 | 4 |
|
5 | |
CFLAGS = -Wall -g $(if $(findstring noopt,$(DEB_BUILD_OPTIONS)), -O0, -O2)
|
|
5 |
CFLAGS:= $(shell dpkg-buildflags --get CFLAGS)
|
|
6 |
CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS)
|
|
7 |
LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS)
|
|
8 |
|
|
9 |
CFLAGS+= -Wall
|
|
10 |
|
|
11 |
export CPPFLAGS CFLAGS LDFLAGS
|
6 | 12 |
|
7 | 13 |
override_dh_auto_build:
|
8 | |
dh_auto_build -D src -- CFLAGS="$(CFLAGS)" \
|
9 | |
DATADIR=/usr/share/games/alex4
|
|
14 |
dh_auto_build -D src -- DATADIR=/usr/share/games/alex4
|
10 | 15 |
|
11 | 16 |
override_dh_auto_clean:
|
12 | 17 |
dh_auto_clean -D src
|