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 $@ $<	
