Makefile 452 B

1234567891011121314151617181920212223242526
  1. CC=gcc
  2. CFLAGS+=-g -std=c99 -Wall -Werror -Wno-unused-but-set-variable -D_GNU_SOURCE -falign-functions=8
  3. SOURCES=read_word.c vm.c \
  4. allocator.c gc.c symboltable.c builtins.c ports.c\
  5. loader.c \
  6. interpreter.c glovars.c information.c \
  7. main.c
  8. OBJECTS=$(SOURCES:.c=.o)
  9. .PHONY: all
  10. all: vm
  11. .PHONY: clean
  12. clean:
  13. rm -f $(OBJECTS)
  14. rm -f vm
  15. global.o: builtins.c
  16. %.o: %.c
  17. $(CC) -c $(CFLAGS) $< -o $@
  18. vm: $(OBJECTS)
  19. $(CC) -o vm $(CFLAGS) $(OBJECTS)