diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-16 18:47:33 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-16 18:47:33 +0100 |
commit | 1be8e16191de38a54d706ad5ff99f20576e6ee71 (patch) | |
tree | ba32393ca42281c0c3857653d123e1b12999a896 /Makefile | |
parent | add todo list (diff) | |
download | blueshift-1be8e16191de38a54d706ad5ff99f20576e6ee71.tar.gz blueshift-1be8e16191de38a54d706ad5ff99f20576e6ee71.tar.bz2 blueshift-1be8e16191de38a54d706ad5ff99f20576e6ee71.tar.xz |
beginning c binding
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -2,23 +2,31 @@ PKGCONFIG = pkg-config OPTIMISE = -Og -g WARN = -Wall -Wextra -pedantic LIBS = xcb-randr -STD = c90 +STD = c99 -FLAGS = $$($(PKGCONFIG) --cflags --libs $(LIBS)) -std=$(STD) $(WARN) $(OPTIMISE) +FLAGS = $$($(PKGCONFIG) --cflags --libs $(LIBS)) -std=$(STD) $(WARN) $(OPTIMISE) -fPIC .PHONY: all all: bin/blueshift_randr -bin/blueshift_randr: obj/blueshift_randr.o +bin/blueshift_randr.so: obj/_blueshift_randr.o obj/blueshift_randr_c.o @mkdir -p bin - $(CC) $(FLAGS) -o $@ $^ + $(CC) $(FLAGS) -shared -o $@ $^ obj/%.o: src/%.c @mkdir -p obj $(CC) $(FLAGS) -c -o $@ $< +obj/%.o: obj/%.c + @mkdir -p obj + $(CC) $(FLAGS) -c -o $@ $< + +obj/_blueshift_randr.c: src/_blueshift_randr.pyx + cd src ; cython -3 $< + mv src/_blueshift_randr.c $@ + .PHONY: all clean: |