Makefile.msvc
author rubidium
Thu, 18 Dec 2008 12:23:08 +0000
changeset 10436 8d3a9fbe8f19
parent 10239 cf55a4c21e7f
permissions -rw-r--r--
(svn r14689) -Change: make configure die on commonly made user mistakes, like not having SDL development files or zlib headers installed; you can still compile a dedicated server or a binary without zlib, but you have to explicitly force it.
9919
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     1
#
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     2
# Makefile for creating bundles of MSVC's binaries in the same way as we make
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     3
# the zip bundles for ALL other OSes.
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     4
#
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     5
# Usage: make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=openttd-<version>-win[32|64]
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     6
#   or   make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=OTTD-win[32|64]-nightly-<revision>
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     7
#
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     8
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
     9
# Check if we want to show what we are doing
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    10
ifdef VERBOSE
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    11
	Q =
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    12
else
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    13
	Q = @
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    14
endif
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    15
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    16
AWK = "awk"
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    17
ROOT_DIR := $(shell pwd)
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    18
BIN_DIR = "$(ROOT_DIR)/bin"
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    19
SRC_DIR = "$(ROOT_DIR)/src"
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    20
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    21
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    22
TTD = "openttd.exe"
10239
cf55a4c21e7f (svn r14467) -Fix [FS#2350](r14443): use '~' instead of '#' as sed separator, it could be understood in a wrong way by shell
smatz
parents: 10057
diff changeset
    23
TARGET := $(shell echo $(PLATFORM) | sed "s~win64~x64~;s~win32~Win32~")
9919
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    24
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    25
all:
9960
10d375f1cdd7 (svn r14115) -Codechange: add make bundle_exe which makes a windows installer and unify the files that go into the bundles (zip/gz/bz2 etc) and installer.
rubidium
parents: 9919
diff changeset
    26
	$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)
9919
5122deb390ae (svn r14074) -Codechange: split the bundle generation out of the main makefile so it can be reused for making bundles from MSVC compiles.
rubidium
parents:
diff changeset
    27
10057
a6dea11e197d (svn r14224) -Fix: copy Makefile.bundle too to your working dir, so you don't need to run ./configure in the root of OpenTTD
truebrain
parents: 9960
diff changeset
    28
include Makefile.bundle.in