Skip to content

Commit 11dd671

Browse files
committed
WIP: architecture specific includes/targets
1 parent 952812c commit 11dd671

File tree

5 files changed

+55
-0
lines changed

5 files changed

+55
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ help:
8484
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
8585
@echo " linkcheck to check all external links for integrity"
8686
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
87+
@# WIP
88+
@# @echo " platform-deps to install platform-specific dependencies"
89+
90+
-include mk/platform-$(shell uname -s | tr ' ' -).mk
8791

8892
clean:
8993
rm -rf $(BUILDDIR)/*
@@ -330,3 +334,10 @@ fetch-submodules:
330334
# (Only works for git servers that allow sha fetches.)
331335
git submodule update --init -N --depth 1 || true
332336
git submodule foreach 'git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1'
337+
338+
install-deps::
339+
@echo "Installing platform dependencies"
340+
pre-commit install
341+
342+
check-deps::
343+
# For checking dependencies for platforms

mk/platform-Darwin-13.0.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ventura specific makefile entries

mk/platform-Darwin-arm64-13.0.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ARM MacOS - Ventura

mk/platform-Darwin-arm64.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ARM MacOS - version independent

mk/platform-Darwin.mk

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Platform-specific defaults/overrides for Darwin
2+
3+
MACOS_VERSION=$(shell sw_vers -productVersion)
4+
-include mk/platform-$(shell uname -s | tr ' ' -)-$(MACOS_VERSION).mk
5+
-include mk/platform-$(shell uname -sm | tr ' ' -).mk
6+
-include mk/platform-$(shell uname -sm | tr ' ' -)-$(MACOS_VERSION).mk
7+
8+
# Check for gnu make 4.2 or higher
9+
MAKE_MIN_VER=4.2
10+
MAKE_VERSION=$(shell $(MAKE) --version | head -1)
11+
MAKE_VERSION_OK=$(shell echo $(MAKE_VERSION) | awk '/GNU Make / && $$3 >= $(MAKE_MIN_VER) { print 1 }')
12+
13+
ifeq ($(origin MAKE),default)
14+
ifneq ($(MAKE_VERSION_OK),true)
15+
# try gmake instead, if found
16+
GMAKE=$(shell which gmake)
17+
ifneq ($(GMAKE),)
18+
ifeq ($(shell $(GMAKE) --version | awk '/GNU Make / && $$3 >= $(MAKE_MIN_VER) { print "true"}'),true)
19+
MAKE:=$(GMAKE)
20+
endif
21+
endif
22+
endif
23+
endif
24+
25+
ifdef $(MAKE_VERSION_OK)
26+
$(error GNU Make >= $(MAKE_MIN_VER) required, you have $(MAKE_VERSION) at $(MAKE) \
27+
Install gnu make with 'brew install make' or specify make with MAKE=path/to/gmake-4.2\
28+
THe install-deps target can be used to install dependencies)
29+
endif
30+
31+
install-deps::
32+
@if [[ ! -x "$$(which brew)" ]]; then \
33+
echo "Homebrew must be installed; See https://brew.sh/"; \
34+
exit 1; \
35+
fi
36+
brew install -q git python3 gettext uncrustify rust
37+
brew install -q gcc-arm-embedded
38+
39+
check-deps::
40+
@which $(brew --prefix)/git || echo "Homebrew-installed git not found" && err=1; \
41+
[ -n "$err" ] && exit 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy