-
Notifications
You must be signed in to change notification settings - Fork 2
/
linux32gcc.gmk
69 lines (61 loc) · 2.64 KB
/
linux32gcc.gmk
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
##version=091224b1
OS=$(shell uname -o | sed 's/GNU.Linux/linux/')
VERSION=$(shell grep -E 'meYEAR|meMONTH|meDAY' src/evers.h | head -n 3 | awk '{ print $$3 }' | paste -sd '-' | sed 's/[-"]//g')
OSV=$(shell grep -E 'VERSION_ID=' /etc/os-release | sed -E 's/VERSION_ID="?([0-9]+).*"?/\1/')
## check for rolling releases with no version-id
ifeq ($(OSV),)
OSV=0
endif
KERNEL=$(shell uname -r | grep -oE '^[0-9]')
DIST=$(shell grep -E '^ID=' /etc/os-release | sed -E 's/ID=//')
OSVERSION="$(DIST)$(OSV)"
RELEASE=linux-$(KERNEL)-$(DIST)-$(OSV)-microemacs-$(VERSION)
app=mecb
default:
echo "Makefile for Linux systems"
echo "VERSION: '$(VERSION)' OS $(OS) OSVERSION $(OSVERSION) OSV $(OSV)"
bfs/bin:
cd bfs && make
mec:
cd src && make -f linux32gcc.gmk BTYP=c
mew:
cd src && make -f linux32gcc.gmk BTYP=w
mecw:
cd src && make -f linux32gcc.gmk BTYP=cw
mecb: bfs/bin mec
./bfs/bfs -a ./src/.linux32gcc-release-mec/mec -o $(RELEASE)-mecb.bin ./jasspa
mewb: bfs/bin mew
./bfs/bfs -a ./src/.linux32gcc-release-mew/mew -o $(RELEASE)-mewb.bin ./jasspa
mecwb: bfs/bin mecw
./bfs/bfs -a ./src/.linux32gcc-release-mecw/mecw -o $(RELEASE)-mecwb.bin ./jasspa
release: $(app)
make -f release.gmk app=$(app) RELEASE=$(RELEASE) ext=bin
app-image: bfs/bin
chmod 755 jme.AppDir/AppRun
-rm -rf jasspa-bfs
cp -r jasspa jasspa-bfs
cp -r jasspa/spelling jme.AppDir/usr/share/
rm -rf jasspa-bfs/contrib
rm -rf jasspa-bfs/company
rm -rf jasspa-bfs/pixmaps
rm -rf jasspa-bfs/spelling
rm -f jasspa-bfs/macros/*~
rm -f jasspa-bfs/macros/*.bak
wget https://github.com/mittelmark/microemacs/releases/download/v09.12.24/linux-5-ubuntu-18-microemacs-091224-mecwb.zip
unzip -p linux-5-ubuntu-18-microemacs-091224-mecwb.zip "linux-5-ubuntu-18-microemacs-091224-mecwb/bin/mecwb" > mecw-ubuntu-18
./bfs/bfs -s mecw-ubuntu-18 # strip of the archive to get the latest macros
./bfs/bfs -a mecw-ubuntu-18 -o jme.AppDir/usr/bin/jme ./jasspa-bfs
appimagetool-x86_64.AppImage jme.AppDir
cp Jasspa_MicroEmacs_09-x86_64.AppImage Jasspa_MicroEmacs_$(VERSION)_x86_64.AppImage
./Jasspa_MicroEmacs_$(VERSION)_x86_64.AppImage -V -n
brew: mecb mewb
mkdir -p brew-linux-$(VERSION)/bin
cp bin/mecu brew-linux-$(VERSION)/bin/
chmod 755 brew-linux-$(VERSION)/bin/mecu
cp bfs/bfs brew-linux-$(VERSION)/bin/
cp $(RELEASE)-mecb.bin brew-linux-$(VERSION)/bin/mecb
cp $(RELEASE)-mewb.bin brew-linux-$(VERSION)/bin/mewb
cp COPYING brew-linux-$(VERSION)/license.txt
cp README-standalone.md brew-linux-$(VERSION)/README.md
tar cfz brew-linux-$(VERSION).tar.gz brew-linux-$(VERSION)/*
sha256sum brew-linux-$(VERSION).tar.gz > brew-linux-$(VERSION).sha256