Codebase list alex4 / 6d40ca0
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
4 changed file(s) with 16 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
99 Closes: #617465
1010 - put the aldumb library before the Allegro libraries that it
1111 depends on
12 - honor CPPFLAGS, CFLAGS and LDFLAGS
1213 * Convert to the 3.0 (quilt) source format.
1314 * Add misc:Depends to the alex4-data package just in case.
1415 * Expand the alex4-data package's long description.
1516 * Bump the debhelper compatibility level to 8 and minimize the rules file
1617 using debhelper override targets.
1718 * 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.
1821
1922 -- Peter Pentchev <roam@ringlet.net> Wed, 09 Mar 2011 14:14:04 +0200
2023
22 Priority: optional
33 Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
44 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
67 Standards-Version: 3.9.1
78 Homepage: http://allegator.sourceforge.net/
89 Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/alex4/
450450 @@ -0,0 +1,24 @@
451451 +PREFIX = /usr/local
452452 +DATADIR = $(PREFIX)/share/$(TARGET)
453 +CFLAGS = -g -Wall -Wno-deprecated-declarations -O2
453 +CFLAGS ?= -g -Wall -Wno-deprecated-declarations -O2
454454 +LIBS = -laldmb -ldumb `allegro-config --libs`
455455 +DEFINES = -DDATADIR=\"$(DATADIR)/\"
456456 +OBJS = actor.o edit.o map.o player.o shooter.o unix.o \
459459 +TARGET = alex4
460460 +
461461 +$(TARGET): $(OBJS)
462 + $(CC) -o $@ $^ $(LIBS)
462 + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
463463 +
464464 +%.o: %.c
465 + $(CC) $(CFLAGS) $(DEFINES) -o $@ -c $<
465 + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -o $@ -c $<
466466 +
467467 +install: $(TARGET)
468468 + mkdir -p $(PREFIX)/bin
22 # Uncomment this to turn on verbose mode.
33 #export DH_VERBOSE=1
44
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
612
713 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
1015
1116 override_dh_auto_clean:
1217 dh_auto_clean -D src