123456789101112131415161718192021222324
  1. PREFIX=$(DESTDIR)/usr
  2. BINDIR=$(PREFIX)/bin
  3. CC=gcc
  4. CFLAGS=-std=c89 -O2 -pedantic -Wall -I"./include"
  5. all:
  6. $(CC) $(CFLAGS) -g -o light src/helpers.c src/light.c src/main.c
  7. exp:
  8. $(CC) $(CFLAGS) -E src/helpers.c src/light.c
  9. install: all
  10. mkdir -p $(BINDIR)
  11. cp -f ./light $(BINDIR)/light
  12. chown root $(BINDIR)/light
  13. chmod 4755 $(BINDIR)/light
  14. uninstall:
  15. rm $(BINDIR)/light
  16. rm -rf /etc/light
  17. clean:
  18. rm -vfr *~ light