-
Notifications
You must be signed in to change notification settings - Fork 2
/
macos32gcc.gmk
79 lines (70 loc) · 2.48 KB
/
macos32gcc.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
70
71
72
73
74
75
76
77
78
79
##-*- makefile -*-############################################################
#
# System :
# Module :
# Object Name : $RCSfile$
# Revision : $Revision$
# Date : $Date$
# Author : $Author$
# Created By : Detlef Groth
# Created : Wed Jul 31 21:47:07 2024
# Last Modified : <241228.1140>
#
# Description
#
# Notes
#
# History
#
# $Log$
#
##############################################################################
#
# Copyright (c) 2024 Detlef Groth.
#
# All Rights Reserved.
#
# This document may not, in whole or in part, be copied, photocopied,
# reproduced, translated, or reduced to any electronic medium or machine
# readable form without prior written consent from Detlef Groth.
#
##############################################################################
#version=091224b1
#VERSION=$(shell grep -e '^version=' macos32gcc.gmk | sed 's/version=//')
VERSION=$(shell grep -E 'meYEAR|meMONTH|meDAY' src/evers.h | head -n 3 | awk '{ print $$3 }' | paste -sd '-' | sed 's/[-"]//g')
CC=gcc-11
MAKE=make
##MAKE=/usr/local/opt/make/libexec/gnubin/make
KERNEL=$(shell uname -r | grep -oE '^[0-9]+' | sed 's/21/12/' | sed 's/22/13/' | sed 's/23/14/' | sed 's/24/15/' | sed 's/25/16/')
OS=macos-$(KERNEL)
RELEASE=macos-$(KERNEL)-microemacs-$(VERSION)
app=mecb
bfs/bin:
echo "VERSION: $(VERSION)"
cd bfs && $(MAKE) CC=$(CC)
mec:
cd src && $(MAKE) -f macos32gcc.gmk CC=$(CC) BTYP=c
mew:
cd src && $(MAKE) -f macos32gcc.gmk CC=$(CC) BTYP=w
mecw:
cd src && $(MAKE) -f macos32gcc.gmk CC=$(CC) BTYP=cw
mecb: mec bfs/bin
./bfs/bfs -a ./src/.macos32gcc-release-mec/mec -o $(RELEASE)-mecb.bin ./jasspa
mewb: mew bfs/bin
./bfs/bfs -a ./src/.macos32gcc-release-mew/mew -o $(RELEASE)-mewb.bin ./jasspa
mecwb: mecw bfs/bin
./bfs/bfs -a ./src/.macos32gcc-release-mecw/mecw -o $(RELEASE)-mecwb.bin ./jasspa
version:
echo "VERSION: $(VERSION)"
release: $(app)
make -f release.gmk app=$(app) RELEASE=$(RELEASE) ext=bin
brew: mecb mewb
mkdir -p brew-macos-$(VERSION)/bin
cp $(RELEASE)-mecb.bin brew-macos-$(VERSION)/bin/mecb
cp $(RELEASE)-mewb.bin brew-macos-$(VERSION)/bin/mewb
cp bin/mecu brew-macos-$(VERSION)/bin/mecu
chmod 755 brew-macos-$(VERSION)/bin/mecu
cp COPYING brew-macos-$(VERSION)/license.txt
cp README-standalone.md brew-macos-$(VERSION)/README.md
tar cfz brew-macos-$(VERSION).tar.gz brew-macos-$(VERSION)/*
sha256sum brew-macos-$(VERSION).tar.gz > brew-macos-$(VERSION).sha256