# Makefile - ua_pong_single_thread example

UA_INC_DIR ?= /usr/local/include/open62541

# Enable/Disable debug
APP_DEBUG = false

CFLAGS = -Wall -I. -I$(UA_INC_DIR)
ifeq ($(APP_DEBUG), true)
	CFLAGS += -g
else
	CFLAGS += -O3
endif

LDLIBS += -lopen62541 -lbpf
LDLIBS += -Wl,-Bdynamic -lpthread -lm

EXEC := ua_pong_single_thread
LOBJS := common.o
LOBJS += opc-rt.o
LOBJS += opc.o
LOBJS += main.o

all: $(EXEC)

$(EXEC): $(LOBJS)
	$(CC) $(CFLAGS) $(LOBJS) $(LDLIBS) -o $@

clean:
	rm -f *.[o,so,a] $(EXEC)
