CC=gcc CFLAGS=$(shell pkg-config --cflags libusb-1.0) -O3 -Wall -shared LDFLAGS=$(shell pkg-config --libs libusb-1.0) FINAL_ASSETS=$(BUILD_DIR)/drivers/assets/razer-viper_mini.png BUILD_DIR=../../build/ all: $(BUILD_DIR)/drivers/razer.so $(FINAL_ASSETS) $(BUILD_DIR)/drivers/razer.so: razer.c | $(BUILD_DIR)/drivers/ $(CC) $(CFLAGS) -o $@ $^ $(BUILD_DIR)/drivers/assets/%.png: %.png | $(BUILD_DIR)/drivers/assets cp $^ $@