Skip to content

Commit 448660b

Browse files
committed
smoothing out build issues, especially on macosx
1 parent 1c0e70d commit 448660b

6 files changed

Lines changed: 26 additions & 13 deletions

File tree

.github/workflows/build_gnulinux.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ jobs:
5555
run: make
5656

5757
- name: build examples
58-
run: make examples
58+
run: |
59+
make -C examples/simple simple_af_unix
60+
make -C examples/fly
5961
6062
- name: stage install
6163
run: |

.github/workflows/build_macosx.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
run: make
5555

5656
- name: build examples
57-
run: make examples
57+
run: |
58+
make -C examples/simple simple_af_unix
59+
make -C examples/fly
5860
5961
- name: stage install
6062
run: |

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ hdr = src/spnav.h src/spnav_magellan.h src/spnav_config.h
55
name = spnav
66
lib_a = lib$(name).a
77

8-
incpaths = -I. -I/usr/local/include -I/usr/X11R6/include
9-
libpaths = -L/usr/local/lib -L/usr/X11R6/lib
8+
incpaths = -I. -I/usr/local/include -I/usr/X11R6/include -I/opt/homebrew/include
9+
libpaths = -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib
1010

1111
CC ?= gcc
1212
AR ?= ar

examples/cube/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
obj = cube.o
22
bin = cube
33

4-
CC = gcc
5-
CFLAGS = -pedantic -Wall -g -I../.. -I../../src -I/usr/local/include
6-
LDFLAGS = -L../.. -L/usr/local/lib -lGL -lGLU -lspnav -lX11 -lm
4+
incdir = -I../.. -I../../src -I/usr/local/include -I/usr/X11R6/include \
5+
-I/opt/homebrew/include
6+
libdir = -L../.. -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib
7+
8+
CFLAGS = -pedantic -Wall -g $(incdir)
9+
LDFLAGS = $(libdir) -lGL -lGLU -lspnav -lX11 -lm
710

811
$(bin): $(obj)
912
$(CC) -o $@ $(obj) $(LDFLAGS)

examples/fly/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
obj = fly.o xwin.o
22
bin = fly
33

4-
CC = gcc
5-
CFLAGS = -pedantic -Wall -O3 -I../.. -I../../src -I/usr/local/include
6-
LDFLAGS = -L../.. -L/usr/local/lib -lGL -lGLU -lspnav -lX11 -lm
4+
incdir = -I../.. -I../../src -I/usr/local/include -I/usr/X11R6/include \
5+
-I/opt/homebrew/include
6+
libdir = -L../.. -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib
7+
8+
CFLAGS = -pedantic -Wall -O3 $(incdir)
9+
LDFLAGS = $(libdir) -lGL -lGLU -lspnav -lX11 -lm
710

811
$(bin): $(obj)
912
$(CC) -o $@ $(obj) $(LDFLAGS)

examples/simple/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
CC = gcc
2-
CFLAGS = -pedantic -Wall -g -I../.. -I../../src -I/usr/local/include
3-
LDFLAGS = -L../.. -L/usr/local/lib -lspnav -lX11 -lm
1+
incdir = -I../.. -I../../src -I/usr/local/include -I/usr/X11R6/include \
2+
-I/opt/homebrew/include
3+
libdir = -L../.. -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib
4+
5+
CFLAGS = -pedantic -Wall -g $(incdir)
6+
LDFLAGS = $(libdir) -lspnav -lX11 -lm
47

58
.PHONY: all
69
all: simple_x11 simple_af_unix

0 commit comments

Comments
 (0)