diff Bison-Flex/Compiler-StackBase/Makefile~ @ 0:db40c85cad7a default tip

upload sample source
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Mon, 09 May 2011 03:11:59 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Bison-Flex/Compiler-StackBase/Makefile~	Mon May 09 03:11:59 2011 +0900
@@ -0,0 +1,39 @@
+SOURCES = script.cpp compiler.cpp node.cpp vm.cpp script-parser.yy script-scanner.ll
+OBJ = script.o compiler.o node.o vm.o script-parser.o script-scanner.o
+BISON_OUTPUT = script-parser.cc script-parser.hh location.hh position.hh
+
+CFLAGS = -O2
+CC = g++
+
+all: script
+
+.SUFFIXES:
+.SUFFIXES: .cpp .cc .ll .yy .o
+
+script: $(OBJ)
+	$(CC) $(LDFLAGS) -o $@ $(OBJ)
+
+
+.cpp.o:
+	$(CC) -c $(CFLAGS) -o $@ $<
+
+.cc.o:
+	$(CC) -c $(CFLAGS) -o $@ $<
+
+depend:
+	makedepend -- $(SOURCES)
+
+$(BISON_OUTPUT): script-parser.yy
+	bison -d -ra -oscript-parser.cc script-parser.yy
+
+script-scanner.cc: script-scanner.ll
+	flex -8 -oscript-scanner.cc script-scanner.ll
+
+script.o: script.cpp
+compiler.o: script-parser.hh compiler.h
+node.o: location.hh vm.h
+vm.o: vm.h
+script-parser.o: $(BISON_OUTPUT)
+script-scanner.o: script-scanner.cc  script-parser.hh
+clean:
+	rm *.o script
\ No newline at end of file