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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.torus explore.html index.html
  34. tar -xf chroot.tar -C /home/$(CHROOT_USER)
  35. install rc.torus /usr/local/etc/rc.d/torus
  36. install -o $(CHROOT_USER) -g $(CHROOT_GROUP) -m 644 \
  37. explore.html \
  38. index.html \
  39. /usr/local/www/ascii.town
  40. clean:
  41. rm -fr $(OBJS) $(BINS) tags root chroot.tar
  42. help.h:
  43. head -c 4096 torus.dat \
  44. | file2c -sx 'static const uint8_t HelpData[] = {' '};' \
  45. > help.h
  46. echo 'static const struct Tile *Help = (const struct Tile *)HelpData;' \
  47. >> help.h
  48. README: torus.1
  49. mandoc torus.1 | col -bx > README