-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.Linux
69 lines (53 loc) · 2.04 KB
/
Makefile.Linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Partial Makefile to be included from top level Makefile on Linux
#
# Possible cross-compilation to Windows
include Makefile.win32
VERSION := $(shell cat NEXTRELEASE)
PLATFORM = linux.$(shell uname -m)
PACKAGE = $(PACKAGENAME).tgz
XPATH := xpath -q -e
# We need to define how to package on Linux
.PHONY: package
package: alan.readme.linux $(PACKAGE)
$(PACKAGE): bin/alan bin/arun alan.readme.linux alan.readme COPYING CHANGES regression/saviour.alan games/adventv3/adventV3.alan
mkdir -p $(PACKAGENAME)
cp $^ $(PACKAGENAME)
tar zcvf $(PACKAGE) $(PACKAGENAME)
-rm -r $(PACKAGENAME)
# Create package of cross-compiled Windows SDK binaries
cross-package: zip
# How to package cross-compiled Windows binaries
# Location of Inno Setup Compiler, this is for WSL
INNODIR = /mnt/c/Program\ Files\ \(x86\)/Inno\ Setup\ 6
###############
# Distribution
#
# Make a distribution for this platform of the current (last) release
distribution: VERSION := $(shell cat LASTRELEASE)
distribution:
@if [[ -f BUILDNUMBER ]] ; then \
echo Should not upload a version with BUILDNUMBER, remove it first ; \
exit 1 ; \
fi
$(MAKE) distribution-build distribution-upload
distribution-build:
$(MAKE) clean all $(PACKAGE)
$(MAKE) -C interpreter gararun
distribution-upload:
bin/alanupload $(PACKAGE) sdks/linux
bin/alanupload interpreter/gargoyle-alan3-$(VERSION)$(BUILDVERSION).$(PLATFORM).tgz interpreters/linux
bin/alanupload interpreter/gargoyle-updater-alan3-$(VERSION)$(BUILDVERSION).$(PLATFORM).sh interpreters/linux
ifneq ($(shell uname -n), thoni64)
##########
#
# Snapshot build and upload, not used on ThoNi's machine where we run
# WSL and can create Linux and Windows snapshots. This is for pure Linux.
#
snapshot-build:
$(MAKE) BUILDNUMBER=$(BUILDNUMBER) BUILDVERSION=$(BUILDVERSION) clean build $(PACKAGE)
$(MAKE) -C interpreter BUILDNUMBER=$(BUILDNUMBER) gararun
snapshot-upload: buildnumbers
bin/alanupload $(PACKAGE) snapshots/$(BUILDNAME)
bin/alanupload interpreter/gargoyle-updater-alan3-$(VERSION)$(BUILDVERSION).$(PLATFORM).sh snapshots/$(BUILDNAME)
endif