Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
35 lines (24 sloc) 0.636 kb
all: parser
OBJS = parser.o \
codegen.o \
main.o \
tokens.o \
corefn.o \
native.o \
LLVMCONFIG = llvm-config
CPPFLAGS = `$(LLVMCONFIG) --cppflags` -std=c++11
LDFLAGS = `$(LLVMCONFIG) --ldflags` -lpthread -ldl -lz -lncurses -rdynamic
LIBS = `$(LLVMCONFIG) --libs`
clean:
$(RM) -rf parser.cpp parser.hpp parser tokens.cpp $(OBJS)
parser.cpp: parser.y
bison -d -o $@ $^
parser.hpp: parser.cpp
tokens.cpp: tokens.l parser.hpp
flex -o $@ $^
%.o: %.cpp
g++ -c $(CPPFLAGS) -o $@ $<
parser: $(OBJS)
g++ -o $@ $(OBJS) $(LIBS) $(LDFLAGS)
test: parser example.txt
cat example.txt | ./parser
Jump to Line
Something went wrong with that request. Please try again.