-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (42 loc) · 1.13 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
TARGET = build/x
LIBS = -lm -lz
CC = gcc
CFLAGS = -g -Werror -O2 -fno-strict-aliasing -Wall -D__DIR__=$(shell pwd) -fPIC
.PHONY: default all clean
default: $(TARGET)
all: default
OBJECTS = $(patsubst src/%.c, src/%.o, $(wildcard src/*.c))
ACTUAL = $(patsubst src/%.o, build/%.o, $(OBJECTS))
HEADERS = $(wildcard src/*.h)
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $(subst src,build,$@)
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(ACTUAL) -Wall $(LIBS) -o $@
py: $(OBJECTS)
ar rcs build/libxandri.a build/blob.o build/util.o
-rm -rf build/lib.*
-rm -rf build/temp.*
python3 setup.py build
cp build/lib*/_xandri* py_interface
clean:
-rm -f *.o
-rm -f $(TARGET)
test:
rm -rf data
ingest/cmds.sh
./x serve
big:
rm -rf data
ingest/big.sh
./x serve
test2:
rm -rf data
./x blob create ssi71
./x blob create-index ssi71 time -b 4 ingest/index.bin
./x blob query-index ssi71 time 15242 3600000 200
./x blob create-key ssi71 altitude_barometer time -t float -b 4 ingest/alts.bin
./x blob create-key ssi71 current_total time -t float -b 4 ingest/current.bin
./x serve
open:
cd src; vi -p xandri.c util.h util.c