A tool for adding anime to your anidb list.
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.

35 lines
1004B

  1. InstallPrefix := /usr/local/bin
  2. gitref="$(shell git rev-parse --short HEAD)@$(shell git branch --show-current)"
  3. PROGNAME := caniadd
  4. VERSION := 1
  5. CFLAGS := -Wall -std=gnu11 #-march=native #-Werror
  6. CPPFLAGS := -DCBC=0 -DCTR=0 -DECB=1 -Isubm/tiny-AES-c/ -Isubm/md5-c/ -Isubm/MD4/ -DPROG_VERSION='"$(VERSION)"' -DGIT_REF='$(gitref)'
  7. LDFLAGS := -lpthread -lsqlite3
  8. SOURCES := $(wildcard src/*.c) subm/tiny-AES-c/aes.c subm/md5-c/md5.c subm/MD4/md4.c #$(TOML_SRC) $(BENCODE_SRC)
  9. OBJS := $(SOURCES:.c=.o)
  10. all: CFLAGS += -O3 -flto
  11. all: CPPFLAGS += #-DNDEBUG Just to be safe
  12. all: $(PROGNAME)
  13. # no-pie cus it crashes on my 2nd pc for some reason
  14. dev: CFLAGS += -Og -ggdb -fsanitize=address -fsanitize=leak -fstack-protector-all -no-pie
  15. dev: $(PROGNAME)
  16. install: $(PROGNAME)
  17. install -s -- $< $(InstallPrefix)/$(PROGNAME)
  18. uninstall:
  19. rm -f -- $(InstallPrefix)/$(PROGNAME)
  20. $(PROGNAME): $(OBJS)
  21. $(CC) -o $@ $+ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
  22. clean:
  23. -rm -- $(OBJS) $(PROGNAME)
  24. re: clean all
  25. red: clean dev