Skip to content

Instantly share code, notes, and snippets.

@vpereira
Created September 9, 2013 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpereira/6502201 to your computer and use it in GitHub Desktop.
Save vpereira/6502201 to your computer and use it in GitHub Desktop.
mindstatec Makefile
CC = clang
CFLAGS = -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/include/python2.7
LDFLAGS = -Wl, -Wl, -lpython2.7
all: test midstate.so
test: midstatemodule.c
$(CC) $(CFLAGS) midstatemodule.c -o test $(LDFLAGS)
midstate.so: midstatemodule.c
$(CC) $(CFLAGS) -fPIC -shared midstatemodule.c -o midstate.so $(LDFLAGS)
.PHONY: clean
clean:
rm -f midstate.so test
~
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment