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.

69 lines
1.7 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. PAM_USB_DEST := $(DESTDIR)/lib/security
  25. # pusb_check
  26. PUSB_CHECK_SRCS := src/pusb_check.c
  27. PUSB_CHECK_OBJS := $(PUSB_CHECK_SRCS:.c=.o)
  28. PUSB_CHECK := pusb_check
  29. # Tools
  30. PUSB_ADM := tools/pusb_adm
  31. PUSB_HOTPLUG := tools/pusb_hotplug
  32. TOOLS_DEST := $(DESTDIR)/usr/bin
  33. # Binaries
  34. RM := rm
  35. INSTALL := install
  36. ifeq (yes, ${DEBUG})
  37. CFLAGS := ${CFLAGS} -ggdb
  38. endif
  39. all : $(PAM_USB) $(PUSB_CHECK)
  40. $(PAM_USB) : $(OBJS) $(PAM_USB_OBJS)
  41. $(CC) -o $(PAM_USB) $(PAM_USB_LDFLAGS) $(OBJS) $(PAM_USB_OBJS)
  42. $(PUSB_CHECK) : $(OBJS) $(PUSB_CHECK_OBJS)
  43. $(CC) -o $(PUSB_CHECK) $(LDFLAGS) $(OBJS) $(PUSB_CHECK_OBJS)
  44. %.o : %.c
  45. ${CC} -c ${CFLAGS} $< -o $@
  46. clean :
  47. $(RM) -f $(PAM_USB) $(PUSB_CHECK) $(OBJS) $(PUSB_CHECK_OBJS) $(PAM_USB_OBJS)
  48. install : all
  49. $(INSTALL) -m644 $(PAM_USB) $(PAM_USB_DEST)
  50. $(INSTALL) -m755 $(PUSB_CHECK) $(TOOLS_DEST)
  51. $(INSTALL) -m755 $(PUSB_ADM) $(TOOLS_DEST)
  52. $(INSTALL) -m755 $(PUSB_HOTPLUG) $(TOOLS_DEST)
  53. deinstall :
  54. $(RM) -f $(PAM_USB_DEST)/$(PAM_USB)
  55. $(RM) -f $(TOOLS_DEST)/$(PUSB_CHECK) $(TOOLS_DEST)/$(PUSB_ADM) $(TOOLS_DEST)/$(PUSB_HOTPLUG)