Makefile 592 B

1234567891011121314151617181920212223242526272829303132
  1. tripl-objs = main.o tripl.o error.o klist.o
  2. tripl-out = tripl
  3. MAKEFLAGS = --no-print-directory
  4. CFLAGS = -Wall -Werror -Iinclude -g -ldl
  5. ifeq ($(install-dir),)
  6. install-dir = /usr/bin
  7. endif
  8. all :
  9. @scripts/mkconfig.py
  10. @$(MAKE) _real_all
  11. _real_all : $(tripl-objs)
  12. @$(MAKE) -C arch/
  13. @$(CC) $(tripl-objs) -o $(tripl-out) -Larch -larch -ldl
  14. @echo "tripl is ready. "
  15. install : $(tripl-out)
  16. @install $(tripl-out) $(install-dir)
  17. %.o : %.c
  18. @$(CC) -c $*.c $(CFLAGS)
  19. @echo -e "\tCC\t\t\t$*.c"
  20. .PHONY clean:
  21. @$(RM) -f $(tripl-objs) $(tripl-out)
  22. @$(MAKE) -C arch/ clean