Hardware authentication for Linux using ordinary USB Flash Drives.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. # Set to 'yes' to include debugging informations, e.g. DEBUG=yes make -e
  2. DEBUG := no
  3. # compiler/linker options
  4. CC := gcc
  5. CFLAGS := -Wall `pkg-config --cflags libxml-2.0` \
  6. `pkg-config --cflags hal-storage`
  7. LDFLAGS := `pkg-config --libs libxml-2.0` \
  8. `pkg-config --libs hal-storage`
  9. # common source files
  10. SRCS := src/conf.c \
  11. src/log.c \
  12. src/xpath.c \
  13. src/hal.c \
  14. src/pad.c \
  15. src/volume.c \
  16. src/local.c \
  17. src/device.c
  18. OBJS := $(SRCS:.c=.o)
  19. # pam_usb
  20. PAM_USB_SRCS := src/pam.c
  21. PAM_USB_OBJS := $(PAM_USB_SRCS:.c=.o)
  22. PAM_USB := pam_usb.so
  23. PAM_USB_LDFLAGS := -shared $(LDFLAGS)
  24. # pusb_check
  25. PUSB_CHECK_SRCS := src/pusb_check.c
  26. PUSB_CHECK_OBJS := $(PUSB_CHECK_SRCS:.c=.o)
  27. PUSB_CHECK := pusb_check
  28. ifeq (yes, ${DEBUG})
  29. CFLAGS := ${CFLAGS} -ggdb
  30. endif
  31. all : $(PAM_USB) $(PUSB_CHECK)
  32. $(PAM_USB) : $(OBJS) $(PAM_USB_OBJS)
  33. $(CC) -o $(PAM_USB) $(PAM_USB_LDFLAGS) $(OBJS) $(PAM_USB_OBJS)
  34. $(PUSB_CHECK) : $(OBJS) $(PUSB_CHECK_OBJS)
  35. $(CC) -o $(PUSB_CHECK) $(LDFLAGS) $(OBJS) $(PUSB_CHECK_OBJS)
  36. %.o : %.c
  37. ${CC} -c ${CFLAGS} $< -o $@
  38. clean :
  39. rm -f $(PAM_USB) $(PUSB_CHECK) $(OBJS) $(PUSB_CHECK_OBJS) $(PAM_USB_OBJS)