File size: 706 Bytes
1c9a8b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LIB      := sandbox/lerobot_host/liblit.dylib
LIBFLAGS := -dynamiclib
else
LIB      := sandbox/lerobot_host/liblit.so
LIBFLAGS := -shared -fPIC
endif

CORES := lit_operator/lit_core.c \
         lit_operator/lit_operator.c \
         lit_operator/dense.c

.PHONY: all lib product demo clean

all: lib

lib: $(LIB)

$(LIB): $(CORES) lit_operator/lit_core.h lit_operator/lit_operator.h \
        lit_operator/dense.h
	clang -O2 -std=c11 -Wall -Wextra -I lit_operator \
	    $(LIBFLAGS) $(CORES) -o $(LIB)

product:
	clang -O2 -std=c11 -Wall -Wextra -Ilit_operator \
	    lit_operator/*.c -o lit

demo: lib
	python3 demo/demo.py

clean:
	rm -f $(LIB) lit