No Description 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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. CHROOT_USER = torus
  2. CHROOT_GROUP = $(CHROOT_USER)
  3. CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
  4. LDFLAGS = -static
  5. LDLIBS = -lcursesw -lutil
  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 server
  18. install -d -o root -g wheel \
  19. root \
  20. root/bin \
  21. root/home \
  22. root/usr/share/misc \
  23. root/var/run
  24. install -d -o $(CHROOT_USER) -g $(CHROOT_GROUP) root/home/$(CHROOT_USER)
  25. install -d -o $(CHROOT_USER) -g $(CHROOT_GROUP) root/var/run/torus
  26. cp -af /usr/share/locale root/usr/share
  27. cp -fp /usr/share/misc/termcap.db root/usr/share/misc
  28. cp -fp /rescue/sh root/bin
  29. install client server root/bin
  30. tar -cf chroot.tar -C root bin home usr var
  31. install: chroot.tar rc.torus
  32. tar -xf chroot.tar -C /home/$(CHROOT_USER)
  33. install rc.torus /usr/local/etc/rc.d/torus
  34. clean:
  35. rm -fr $(OBJS) $(BINS) tags root chroot.tar
  36. help.h:
  37. head -c 4096 torus.dat \
  38. | file2c -sx 'static const uint8_t HelpData[] = {' '};' \
  39. > help.h
  40. echo 'static const struct Tile *Help = (const struct Tile *)HelpData;' \
  41. >> help.h
  42. README: torus.1
  43. mandoc torus.1 | col -bx > README