Makefile.bsd 364 B

123456789101112131415161718192021
  1. OS ?= FreeBSD
  2. #OS ?= NetBSD
  3. #OS ?= OpenBSD
  4. CFLAGS ?= -O2 -Wall
  5. CC ?= gcc
  6. .if $(OS) == "FreeBSD"
  7. CFLAGS += -DUSE_LIBUSB
  8. LIBS = -lusb
  9. .elif $(OS) == "NetBSD" || $(OS) == "OpenBSD"
  10. CFLAGS += -DUSE_UHID
  11. LIBS =
  12. .endif
  13. hid_bootloader_cli: hid_bootloader_cli.c
  14. $(CC) $(CFLAGS) -s -o hid_bootloader_cli hid_bootloader_cli.c $(LIBS)
  15. clean:
  16. rm -f hid_bootloader_cli