Makefile 503 B

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