Skip to content

Commit

Permalink
smoothing out build issues, especially on macosx
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsiomb committed May 30, 2024
1 parent 1c0e70d commit 448660b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_gnulinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
run: make

- name: build examples
run: make examples
run: |
make -C examples/simple simple_af_unix
make -C examples/fly
- name: stage install
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ jobs:
run: make

- name: build examples
run: make examples
run: |
make -C examples/simple simple_af_unix
make -C examples/fly
- name: stage install
run: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ hdr = src/spnav.h src/spnav_magellan.h src/spnav_config.h
name = spnav
lib_a = lib$(name).a

incpaths = -I. -I/usr/local/include -I/usr/X11R6/include
libpaths = -L/usr/local/lib -L/usr/X11R6/lib
incpaths = -I. -I/usr/local/include -I/usr/X11R6/include -I/opt/homebrew/include
libpaths = -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib

CC ?= gcc
AR ?= ar
Expand Down
9 changes: 6 additions & 3 deletions examples/cube/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
obj = cube.o
bin = cube

CC = gcc
CFLAGS = -pedantic -Wall -g -I../.. -I../../src -I/usr/local/include
LDFLAGS = -L../.. -L/usr/local/lib -lGL -lGLU -lspnav -lX11 -lm
incdir = -I../.. -I../../src -I/usr/local/include -I/usr/X11R6/include \
-I/opt/homebrew/include
libdir = -L../.. -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib

CFLAGS = -pedantic -Wall -g $(incdir)
LDFLAGS = $(libdir) -lGL -lGLU -lspnav -lX11 -lm

$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)
Expand Down
9 changes: 6 additions & 3 deletions examples/fly/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
obj = fly.o xwin.o
bin = fly

CC = gcc
CFLAGS = -pedantic -Wall -O3 -I../.. -I../../src -I/usr/local/include
LDFLAGS = -L../.. -L/usr/local/lib -lGL -lGLU -lspnav -lX11 -lm
incdir = -I../.. -I../../src -I/usr/local/include -I/usr/X11R6/include \
-I/opt/homebrew/include
libdir = -L../.. -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib

CFLAGS = -pedantic -Wall -O3 $(incdir)
LDFLAGS = $(libdir) -lGL -lGLU -lspnav -lX11 -lm

$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)
Expand Down
9 changes: 6 additions & 3 deletions examples/simple/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CC = gcc
CFLAGS = -pedantic -Wall -g -I../.. -I../../src -I/usr/local/include
LDFLAGS = -L../.. -L/usr/local/lib -lspnav -lX11 -lm
incdir = -I../.. -I../../src -I/usr/local/include -I/usr/X11R6/include \
-I/opt/homebrew/include
libdir = -L../.. -L/usr/local/lib -L/usr/X11R6/lib -L/opt/homebrew/lib

CFLAGS = -pedantic -Wall -g $(incdir)
LDFLAGS = $(libdir) -lspnav -lX11 -lm

.PHONY: all
all: simple_x11 simple_af_unix
Expand Down

0 comments on commit 448660b

Please sign in to comment.