Makefile 445 B

123456789101112131415161718192021222324252627
  1. arch = interp x86_64
  2. CFLAGS = -Wall -Werror -I../include -g
  3. templ = arch_templ.o cstyles.o
  4. targ = libarch.a
  5. all : $(templ)
  6. @# this writes into arch.a
  7. @for n in $(arch); do \
  8. $(MAKE) -C $$n; \
  9. done;
  10. @$(AR) cr $(targ) $(templ)
  11. @echo -e "\tAR\t\t\t$(targ)"
  12. %.o : %.c
  13. @$(CC) $(CFLAGS) -c $*.c
  14. @echo -e "\tCC\t\t\t$*.c"
  15. .PHONY clean :
  16. @for n in $(arch); do \
  17. $(MAKE) -C $$n clean; \
  18. done;
  19. $(RM) libarch.a $(templ)