Skip to content

Instantly share code, notes, and snippets.

@NichtJens
Last active December 14, 2015 04:59
Show Gist options
  • Save NichtJens/5032403 to your computer and use it in GitHub Desktop.
Save NichtJens/5032403 to your computer and use it in GitHub Desktop.
CC = gcc
CFLAGS = -fPIC -O3 -shared
LDFLAGS =
SOURCES = NativeComp.c
OBJECTS = $(SOURCES:.c=.so)
CFLAGS += `pkg-config --cflags python`
LDFLAGS += `pkg-config --libs python`
all: $(OBJECTS)
$(OBJECTS): $(SOURCES)
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
clean:
rm $(OBJECTS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment