Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81030 / 1,2-rust2html / Makefile
diff options
context:
space:
mode:
1 files changed, 21 insertions, 0 deletions
-rw-r--r--homework/81030/1,2-rust2html/Makefile21
diff --git a/homework/81030/1,2-rust2html/Makefile b/homework/81030/1,2-rust2html/Makefile
new file mode 100644
index 0000000..b6f2dde
--- /dev/null
+++ b/homework/81030/1,2-rust2html/Makefile
@@ -0,0 +1,21 @@
+PROGRAM_NAMES := rust2html rust2html-prettyprint
+PROGRAM_SOURCE_FILENAMES := $(patsubst %,%.lex.yy.c,PROGRAM_NAMES)
+
+LEX := flex
+
+ifdef DEBUG
+LEX_FLAGS := -d
+endif
+
+.PHONY: all clean
+
+all: $(PROGRAM_NAMES)
+
+%: %.lex.yy.c
+ $(CC) $(CFLAGS) -o $@ $<
+
+%.lex.yy.c: %.l
+ $(LEX) $(LEX_FLAGS) -o $@ $<
+
+clean:
+ $(RM) $(PROGRAM_NAMES) $(PROGRAM_SOURCE_FILENAMES) lex.yy.c example.html