Collaborative ASCII art https://ascii.town
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.

Makefile 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. CHROOT_USER = torus
  2. CHROOT_GROUP = $(CHROOT_USER)
  3. CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
  4. LDFLAGS = -static
  5. LDLIBS = -lcursesw -lutil -lz
  6. -include config.mk
  7. BINS = client image merge meta server
  8. OBJS = $(BINS:%=%.o)
  9. all: tags $(BINS)
  10. $(OBJS): torus.h
  11. client.o: help.h
  12. image.o: png.h
  13. .o:
  14. $(CC) $(LDFLAGS) $< $(LDLIBS) -o $@
  15. tags: *.h *.c
  16. ctags -w *.h *.c
  17. chroot.tar: client image server default8x16.psfu
  18. install -d -o root -g wheel \
  19. root \
  20. root/bin \
  21. root/home \
  22. root/usr/share/misc \
  23. root/usr/share/torus \
  24. root/var/run
  25. install -d -o $(CHROOT_USER) -g $(CHROOT_GROUP) root/home/$(CHROOT_USER)
  26. install -d -o $(CHROOT_USER) -g $(CHROOT_GROUP) root/var/run/torus
  27. cp -af /usr/share/locale root/usr/share
  28. cp -fp /usr/share/misc/termcap.db root/usr/share/misc
  29. cp -fp /rescue/sh root/bin
  30. install client image server root/bin
  31. install -m 644 default8x16.psfu root/usr/share/torus
  32. tar -cf chroot.tar -C root bin home usr var
  33. install: chroot.tar rc.kfcgi rc.torus explore.html index.html
  34. tar -xf chroot.tar -C /home/$(CHROOT_USER)
  35. install rc.kfcgi /usr/local/etc/rc.d/kfcgi
  36. install rc.torus /usr/local/etc/rc.d/torus
  37. install -o $(CHROOT_USER) -g $(CHROOT_GROUP) -m 644 \
  38. explore.html \
  39. index.html \
  40. /usr/local/www/ascii.town
  41. clean:
  42. rm -fr $(OBJS) $(BINS) tags root chroot.tar
  43. help.h:
  44. head -c 4096 torus.dat \
  45. | file2c -sx 'static const uint8_t HelpData[] = {' '};' \
  46. > help.h
  47. echo 'static const struct Tile *Help = (const struct Tile *)HelpData;' \
  48. >> help.h
  49. README: torus.1
  50. mandoc torus.1 | col -bx > README