blob: 6aacca176c621163fa8b72c527d880e2ae40ba63 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
PKGCONFIG = pkg-config
OPTIMISE = -Og -g
WARN = -Wall -Wextra -pedantic
LIBS = xcb-randr
STD = c99
FLAGS = $$($(PKGCONFIG) --cflags --libs $(LIBS)) -std=$(STD) $(WARN) $(OPTIMISE) -fPIC
.PHONY: all
all: bin/blueshift_randr
bin/blueshift_randr.so: obj/_blueshift_randr.o obj/blueshift_randr_c.o
@mkdir -p bin
$(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:
-rm -r bin obj
|