~ubuntu-branches/debian/wheezy/mame/wheezy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Emmanuel Kasper, Cesare Falco, Emmanuel Kasper
  • Date: 2012-11-13 17:39:32 UTC
  • mfrom: (5.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20121113173932-squrhy6f6stmnlo6
Tags: 0.146-5
[ Cesare Falco ]
* Replace -march with -mtune=generic gcc flag for compatibility issues
  with older CPUs (LP: #1063993)

[ Emmanuel Kasper ]
* Add support for parallel building using DEB_BUILD_OPTIONS
* Reorganize default paths:
     $HOME/.mame for ini file and output files
     $HOME/mame for data search paths

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
15
15
 
16
 
# Number of make jobs = number of cores + 1
17
 
NJOBS:=$(shell echo $$(($$(getconf _NPROCESSORS_ONLN 2>/dev/null) + 1)))
18
 
ifdef SETNJOBS
19
 
        NJOBS:=$(SETNJOBS)
 
16
# taken verbatim from debian policy
 
17
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
18
         NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
19
         MAKEFLAGS += -j$(NUMJOBS)
20
20
endif
21
21
 
 
22
 
22
23
# Override relevant make variables in original makefile
23
24
DEB_MAME_OPTS = \
24
25
    OPT_FLAGS="-D'INI_PATH=\"/etc/mame\"'" \
53
54
# Linux architectures
54
55
ifeq ($(DEB_HOST_ARCH),amd64)
55
56
DEB_MAME_OPTS += \
56
 
    ARCHOPTS=-march=athlon64 \
 
57
    ARCHOPTS=-mtune=generic \
57
58
    FORCE_DRC_C_BACKEND= \
58
59
    PTR64=1 \
59
60
    NOASM= \
62
63
 
63
64
ifeq ($(DEB_HOST_ARCH),i386)
64
65
DEB_MAME_OPTS += \
65
 
    ARCHOPTS=-march=pentium2 \
 
66
    ARCHOPTS=-mtune=generic \
66
67
    FORCE_DRC_C_BACKEND= \
67
68
    PTR64= \
68
69
    NOASM= \
140
141
        dh $@
141
142
 
142
143
override_dh_auto_build:
143
 
        $(MAKE) -j$(NJOBS) $(DEB_MAME_OPTS)
 
144
        $(MAKE) $(DEB_MAME_OPTS)
144
145
        $(CURDIR)/mame -createconfig
145
146
        mv mame.ini default.mame.ini
146
147