Skip to content

Commit

Permalink
Adds -lm to the linker
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecampbell committed Jun 17, 2013
1 parent e0aaf3a commit 9c20b62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
CC=gcc
SRCDIR=extensions
CFLAGS=-std=c99 -g -ggdb -Wall -I$(SRCDIR)
LDFLAGS=-lm

test_objects=$(SRCDIR)/test.o $(SRCDIR)/spike.o $(SRCDIR)/utils.o $(SRCDIR)/gradient.o $(SRCDIR)/time_utils.o

all: $(SRCDIR)/test

$(SRCDIR)/test: $(test_objects)
$(CC) -o $(SRCDIR)/test $(test_objects)
$(CC) -o $(SRCDIR)/test $(LDFLAGS) $(test_objects)

$(test_objects): %.o: %.c
$(CC) -o $@ $(CFLAGS) -c $<

clean:
rm -rf $(SRCIDR)/*.o
rm -rf $(SRCDIR)/*.o
rm -rf $(SRCDIR)/test

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"extensions/time_utils.c",]


qc_extension = Extension("ion_functions.qc.qc_extensions", extension_sources, include_dirs=[np.get_include(), "extensions/"])
qc_extension = Extension("ion_functions.qc.qc_extensions", extension_sources, include_dirs=[np.get_include(), "extensions/"], libraries=["m"])


setup(name = 'ion-functions',
Expand Down

0 comments on commit 9c20b62

Please sign in to comment.