Skip to content

Instantly share code, notes, and snippets.

@mbeltagy
Created April 4, 2017 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbeltagy/654098a7183f18560622c1df4006bff3 to your computer and use it in GitHub Desktop.
Save mbeltagy/654098a7183f18560622c1df4006bff3 to your computer and use it in GitHub Desktop.
For the Julia calling C minimal example
CC=gcc
CFLAGS=-c -Wall -fPIC
SOURCES=calc_mean.c
OBJECTS=$(SOURCES:.c=.o)
.c.o:
$(CC) $(CFLAGS) $< -o $@
lib: $(OBJECTS)
$(CC) -shared -fPIC -o libmean.so $(OBJECTS)
clean:
rm *.o *.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment