Makefile 376 B

12345678910111213141516171819202122232425
  1. arch = interp x86_64
  2. CFLAGS = -Wall -Werror -I../include -g
  3. templ = arch_templ.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. .PHONY clean :
  14. @for n in $(arch); do \
  15. $(MAKE) -C $$n clean; \
  16. done;
  17. $(RM) libarch.a $(templ)