Makefile 516 B

12345678910111213141516171819202122232425
  1. CC?=gcc
  2. CXX?=g++
  3. CFLAGS=-Wall -Wextra -O2 -std=c11 `llvm-config --cflags` -Wno-discarded-qualifiers -c
  4. LDFLAGS=`llvm-config --cxxflags --ldflags`
  5. CFILES=src/ast.c src/erupt.c src/lexer.c src/main.c src/parser.c src/token.c \
  6. src/stack.c
  7. OBJFILES=ast.o erupt.o lexer.o main.o parser.o token.o stack.o
  8. all:
  9. @mkdir -p bin/
  10. $(CC) $(CFLAGS) $(CFILES)
  11. $(CXX) $(OBJFILES) $(LDFLAGS) -o bin/erupt
  12. @-rm $(OBJFILES)
  13. install:
  14. cp bin/erupt /usr/bin/
  15. clean:
  16. @-rm -rf $(OBJFILES) bin/
  17. test:
  18. @bin/erupt tests/*