1
0

Makefile 567 B

12345678910111213141516171819202122232425262728293031323334
  1. CC = gcc
  2. COPTS = -O2 -g
  3. CFLAGS = $(COPTS) -I.. -I../../include -fPIC
  4. LDFLAGS = -shared
  5. LDADD = -lutil
  6. INSTALL = install -o root
  7. prefix = /usr/local
  8. PLUGINS = pptpd-logwtmp.so
  9. # include dependencies if present
  10. ifeq (.depend,$(wildcard .depend))
  11. include .depend
  12. endif
  13. all: $(PLUGINS)
  14. %.so: %.c
  15. $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
  16. LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
  17. install: $(PLUGINS)
  18. $(INSTALL) -d $(LIBDIR)
  19. $(INSTALL) $? $(LIBDIR)
  20. uninstall:
  21. rm -f $(LIBDIR)$(PLUGINS)
  22. clean:
  23. rm -f *.o *.so *.a
  24. depend:
  25. $(CPP) -M $(CFLAGS) *.c >.depend