cpp data recorder

This commit is contained in:
2025-05-23 06:18:23 -05:00
parent fcb291590b
commit 7f2dd0103e
12 changed files with 788 additions and 203 deletions

25
cpp/Makefile Executable file
View File

@@ -0,0 +1,25 @@
CC = g++
FLAGS = -std=c++17 -pthread
# CFLAGS =
CFLAGS = -fPIC
LDFLAGS = -shared
# LDFLAGS = -L/usr/lib/aarch64-linux-gnu
DEBUGFLAGS = -O0
RELEASEFLAGS = -O2
all: test_data_recorder
PROGS=test_data_recorder library
all: $(PROGS)
library: data_recorder.o
$(CC) $(LDFLAGS) $(CFLAGS) -o data_recorder.so $^
test_data_recorder: data_recorder.o test_data_recorder.o
$(CC) -pthread -o $@ $^
clean:
rm -f $(PROGS) *.o *.a *.d
%.o: %.cpp
$(CC) -c $(FLAGS) $(CFLAGS) -o $@ $<