Ticket #8755: makefiles.patch

File makefiles.patch, 7.1 KB (added by jvprat, 16 years ago)
  • tools/update-version.pl

     
    3131
    3232# List of the files in which we need to perform substitution.
    3333my @subs_files = qw(
    34         backends/platform/ds/arm9/makefile
    3534        base/internal_version.h
    36         dists/iphone/Info.plist
    37         dists/macosx/Info.plist
    3835        dists/redhat/scummvm.spec
    3936        dists/scummvm.rc
    4037        dists/slackware/scummvm.SlackBuild
  • Makefile.common

     
    55######################################################################
    66# The default build target: just build the scummvm executable
    77######################################################################
     8
    89all: $(EXECUTABLE) plugins
    910
    1011
    1112######################################################################
    12 # Various minor settings
    13 ######################################################################
    14 
    15 # Files that are to be included in the archive built by "make dist"
    16 DISTFILES := \
    17         Makefile Makefile.common \
    18         AUTHORS NEWS README COPYING COPYRIGHT
    19 
    20 # The dist file name
    21 ZIPFILE := scummvm-`date '+%Y-%m-%d'`.zip
    22 
    23 # The name for the directory used for depenency tracking
    24 DEPDIR := .deps
    25 
    26 
    27 ######################################################################
    2813# Module settings
    2914######################################################################
    3015
     
    5338DEFINES += -DDISABLE_HQ_SCALERS
    5439endif
    5540
     41
    5642######################################################################
    5743# The build rules follow - normally you should have no need to
    5844# touch whatever comes after here.
    5945######################################################################
    6046
    6147# Concat DEFINES and INCLUDES to form the CPPFLAGS
    62 CPPFLAGS:= $(DEFINES) $(INCLUDES)
     48CPPFLAGS := $(DEFINES) $(INCLUDES)
    6349
    6450# Include the build instructions for all modules
    6551-include $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES)))
     
    7460base/version.o: $(filter-out base/libbase.a,$(OBJS))
    7561
    7662# The build rule for the ScummVM executable
    77 $(EXECUTABLE):  $(OBJS)
     63$(EXECUTABLE): $(OBJS)
    7864        $(CXX) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
    7965
    8066distclean: clean
     
    8470clean:
    8571        $(RM) $(OBJS) $(EXECUTABLE)
    8672
    87 .PHONY: all clean dist distclean plugins
    88 
    8973# Old (dumb) compile & dependcy rules
    9074#INCS   = scumm/scumm.h common/scummsys.h
    9175#.cpp.o:
     
    123107
    124108# Include the dependency tracking files.
    125109-include $(wildcard $(addsuffix /*.d,$(DEPDIRS)))
     110
     111
     112######################################################################
     113# Create the files that depend on the version
     114######################################################################
     115
     116VERSION_FILES = \
     117        $(srcdir)/dists/iphone/Info.plist \
     118        $(srcdir)/dists/macosx/Info.plist
     119
     120VERSION = $(shell cat "${srcdir}/base/internal_version.h" | cut -d\" -f2)
     121VER_MAJOR = $(shell echo $(VERSION) | cut -d. -f 1)
     122VER_MINOR = $(shell echo $(VERSION) | cut -d. -f 2)
     123VER_PATCH = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c1)
     124VER_EXTRA = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c2-)
     125
     126$(VERSION_FILES): %: %.in
     127        @echo "Creating $@"
     128        @cat $< | sed \
     129                -e "s/@VER_MAJOR@/$(VER_MAJOR)/g" \
     130                -e "s/@VER_MINOR@/$(VER_MINOR)/g" \
     131                -e "s/@VER_PATCH@/$(VER_PATCH)/g" \
     132                -e "s/@VER_EXTRA@/$(VER_EXTRA)/g" \
     133                -e "s/@VERSION@/$(VERSION)/g" \
     134                > $@
     135
     136
     137######################################################################
     138# Distribution settings
     139######################################################################
     140
     141ifeq ($(VER_EXTRA),svn)
     142DISTVERSION = $(shell date '+%Y-%m-%d')
     143else
     144DISTVERSION = $(VERSION)
     145endif
     146
     147DISTNAME := scummvm-$(DISTVERSION)
     148DISTDIR := dist
     149VERFILE := $(DISTDIR)/$(DISTNAME)/base/internal_version.h
     150
     151ifeq ($(shell svn stat $(srcdir) 2>&1 | grep "is not a working copy"),)
     152SVNROOT := $(srcdir)
     153else
     154SVNROOT := https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/
     155endif
     156
     157$(VERFILE): $(srcdir)/base/internal_version.h
     158        @$(RM_REC) $(DISTDIR)
     159        @$(MKDIR) $(DISTDIR)
     160        svn export $(SVNROOT) $(DISTDIR)/$(DISTNAME)
     161
     162$(DISTDIR)/$(DISTNAME).tar.gz: $(VERFILE)
     163        cd $(DISTDIR); tar zcf $(DISTNAME).tar.gz $(DISTNAME)
     164
     165$(DISTDIR)/$(DISTNAME).tar.bz2: $(VERFILE)
     166        cd $(DISTDIR); tar jcf $(DISTNAME).tar.bz2 $(DISTNAME)
     167
     168$(DISTDIR)/$(DISTNAME).zip: $(VERFILE)
     169        cd $(DISTDIR); zip -qr9 $(DISTNAME).zip $(DISTNAME)
     170
     171dist-src: \
     172        $(DISTDIR)/$(DISTNAME).tar.gz \
     173        $(DISTDIR)/$(DISTNAME).tar.bz2 \
     174        $(DISTDIR)/$(DISTNAME).zip
     175        @#RPM-src?
     176        @#DEB-src?
     177
     178.PHONY: all clean distclean plugins dist-src
  • backends/platform/ds/arm9/makefile

     
    440440
    441441#---------------------------------------------------------------------------------
    442442%.nds: %.bin
    443         @echo ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM 0.11.0svn;DS Port"
    444         ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM 0.11.0svn;DS Port"
     443        @echo ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM $(VERSION);DS Port"
     444        ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM $(VERSION);DS Port"
    445445        dsbuild $@ -l ../ndsloader.bin
    446446
    447447        padbin 16 $(basename $@).ds.gba
  • Makefile

     
    99DEFINES     := -DHAVE_CONFIG_H
    1010LDFLAGS     :=
    1111INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/engines
    12 LIBS        :=
    13 OBJS        :=
     12LIBS        :=
     13OBJS        :=
     14DEPDIR      := .deps
    1415
    1516MODULES     :=
    1617MODULE_DIRS :=
  • ports.mk

     
    2424        rm -rf "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
    2525        rm -rf "$(DESTDIR)$(DATADIR)/scummvm/"
    2626
    27 dist:
    28         $(RM) $(ZIPFILE)
    29         $(ZIP) $(ZIPFILE) $(DISTFILES)
    30 
    3127deb:
    3228        ln -sf dists/debian;
    3329        debian/prepare
     
    3632
    3733# Special target to create a application wrapper for Mac OS X
    3834bundle_name = ScummVM.app
    39 bundle: scummvm-static
     35bundle: scummvm-static $(srcdir)/dists/macosx/Info.plist
    4036        mkdir -p $(bundle_name)/Contents/MacOS
    4137        mkdir -p $(bundle_name)/Contents/Resources
    4238        echo "APPL????" > $(bundle_name)/Contents/PkgInfo
     
    5248        $(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
    5349        strip $(bundle_name)/Contents/MacOS/scummvm
    5450
    55 iphonebundle:
     51iphonebundle: $(srcdir)/dists/iphone/Info.plist
    5652        mkdir -p $(bundle_name)
    5753        cp $(srcdir)/dists/iphone/Info.plist $(bundle_name)/
    5854        cp $(srcdir)/gui/themes/modern.ini $(bundle_name)/
     
    177173        cp README $(AOS4PATH)/README.txt
    178174        cp /sdk/local/documentation/SDL-1.2.9/README-SDL.txt $(AOS4PATH)
    179175
    180 .PHONY: deb bundle osxsnap win32dist dist install uninstall
     176.PHONY: deb bundle osxsnap win32dist install uninstall