# This toplevel Makefile compiles the library in the lib subdirectory.
# If you want to see how to integrate the library in your own projects, check
# out the sub-directories examples-api-use/ and utils/
RGB_LIBDIR=./lib
RGB_LIBRARY_NAME=rgbmatrix
RGB_LIBRARY=$(RGB_LIBDIR)/lib$(RGB_LIBRARY_NAME).a

# Some language bindings.
# Python is now handled by scikit-build-core and cmake, not here.
# PYTHON_LIB_DIR=bindings/python
CSHARP_LIB_DIR=bindings/c\#

all : $(RGB_LIBRARY)

$(RGB_LIBRARY): FORCE
	$(MAKE) -C $(RGB_LIBDIR)
	$(MAKE) -C examples-api-use

clean:
	$(MAKE) -C lib clean
	$(MAKE) -C utils clean
	$(MAKE) -C examples-api-use clean
	# $(MAKE) -C $(PYTHON_LIB_DIR) clean

install:
	$(MAKE) -C $(RGB_LIBDIR) install

uninstall:
	$(MAKE) -C $(RGB_LIBDIR) uninstall

build-csharp:
	$(MAKE) -C $(CSHARP_LIB_DIR) nuget
	$(MAKE) -C $(CSHARP_LIB_DIR) build

FORCE:
.PHONY: FORCE install uninstall
