Makefile 411 B

1234567891011121314151617181920212223242526
  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. %.o : %.c
  12. @$(CC) $(CFLAGS) -c $*.c
  13. @echo "\tCC\t\t\t$*.c"
  14. .PHONY clean :
  15. @for n in $(arch); do \
  16. $(MAKE) -C $$n clean; \
  17. done;
  18. $(RM) libarch.a $(templ)