CC = cc
LIBDIR = ../../vnc_driver
INCLUDES = -I$(LIBDIR)/include
CFLAGS = -Wpedantic

all: sensor

clean:
	rm -f main.o sensor
	cd $(LIB_DIR) && make clean

sensor: main.o proglib
	$(CC) -o sensor main.o -L $(LIBDIR)/build -lvnc -lpthread

proglib:
	cd $(LIBDIR) && make

main.o: main.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@

