Makefile 613 B

1234567891011121314151617181920212223242526
  1. # the autoconf utils can not run well on ms-windows, and it's
  2. # not easy to write a configure.ac for libraries.
  3. objs = spearl.o error.o builtin.o klist.o
  4. srcs = spearl.c error.c builtin.c klist.c
  5. target = libspearl.a
  6. CFLAGS = -Wall -Wextra -Werror -Iinclude -g
  7. MAKEFLAGS = --no-print-directory
  8. all : $(target)
  9. $(target) : $(srcs) $(objs)
  10. @$(AR) -cr $(target) $(objs)
  11. @echo -e "\tAR\t\t$(target)"
  12. s : $(target)
  13. @$(MAKE) $(MAKEFLAGS) -C samples/
  14. %.o : %.c
  15. @$(CC) $*.c -c $(CFLAGS)
  16. @echo -e "\tCC\t\t$*.c"
  17. .PHONY clean :
  18. -rm -f $(target) $(objs)
  19. $(MAKE) $(MAKEFLAGS) -C samples/ clean