Skip to content

Commit

Permalink
fix the builddir
Browse files Browse the repository at this point in the history
  • Loading branch information
jkitchin committed Jan 4, 2025
1 parent 7dd4ec4 commit 7bb40b9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/gsl/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
all: gsl-linalg.so

clean:
rm *.o *.so

# Where your dynamic-module-enabled Emacs build lies.
EMACS = $(shell realpath `which emacs`)
EMACS_BIN = $(shell dirname $(EMACS))
EMACS_BUILDDIR ?= $(shell dirname $(EMACS_BIN))/..

##############
# GSL linalg #
##############

LIBS = $(shell pkg-config --libs gsl)
LDFLAGS += -shared
CFLAGS += -g3 -Og -shared -fPIC -I$(EMACS_BUILDDIR)/include/ -I$(EMACS_BUILDDIR)/lib/ $(shell pkg-config --cflags gsl)

gsl-linalg.so: gsl-linalg.o
$(CC) $(LDFLAGS) -o gsl-linalg.so gsl-linalg.o $(LIBS)

gsl-linalg.o: gsl-linalg.c

test: gsl-linalg.so tests.el
emacs -batch -q -l tests.el -f test-linalg
emacs -batch -q -l tests.el -f test-dgemm

0 comments on commit 7bb40b9

Please sign in to comment.