Fix Makefile for Apple Silicon M1 and add CI build

This commit is contained in:
Brandon Rhodes 2024-02-19 18:24:08 -05:00
parent 30e14f685e
commit 185f4b0202
2 changed files with 24 additions and 2 deletions

View File

@ -35,3 +35,20 @@ jobs:
run: make -C GUI/xephem
- name: Test
run: make -C tests
compile-apple-silicon:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: Install OpenMotif
run: brew install openmotif && brew info openmotif
- name: Install groff
run: brew install groff && brew info groff
- name: Install OpenSSL
run: brew install openssl && brew info openssl
- name: Install XQuartz
run: brew install xquartz --cask && brew info xquartz
- name: Compile
run: make -C GUI/xephem
- name: Test
run: make -C tests

View File

@ -29,11 +29,16 @@ MOTIFL = /usr/lib
endif
# For Linux and Apple OS X
# /opt/homebrew is for modern Apple Silicon; the other paths, for older macOS.
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
PLATI = -I/usr/local/opt/openssl@3/include -I/opt/X11/include
PLATL = -L/usr/local/opt/openssl@3/lib -L/opt/X11/lib
PLATI = -I/opt/homebrew/include \
-I/usr/local/opt/openssl@3/include \
-I/opt/X11/include
PLATL = -L/opt/homebrew/lib \
-L/usr/local/opt/openssl@3/lib \
-L/opt/X11/lib
endif
CC = gcc