Makefile 280 B

12345678910111213
  1. CC = gcc
  2. LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
  3. LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
  4. WARNINGS = -Wall -Wextra
  5. CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS)
  6. LDFLAGS = $(LIBUSB_LIBS)
  7. all: test
  8. %: %.c
  9. $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
  10. clean:
  11. $(RM) test