Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 0MI0800028 / Homework 02 / Makefile
diff options
context:
space:
mode:
Commit44556efa3f2b984946c3054b65603179b0b37710 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-11-17 00:08:59 +0200
Committer
 Syndamia <kamen@syndamia.com>
2022-11-17 00:08:59 +0200
Files67ff421005e54b2a2b51e6ab22056dda813dac55 /homework/0MI0800028/Homework 02/Makefile
IPL-homework2.tar
IPL-homework2.tar.gz
IPL-homework2.zip
Parent7e8bcc75b6ae00248ad4f9ff9753be251d88a4ff (diff)
Added solution to second homework homework2
1 files changed, 31 insertions, 0 deletions
-rw-r--r--homework/0MI0800028/Homework 02/Makefile31
diff --git a/homework/0MI0800028/Homework 02/Makefile b/homework/0MI0800028/Homework 02/Makefile
new file mode 100644
index 0000000..91f0182
--- /dev/null
+++ b/homework/0MI0800028/Homework 02/Makefile
@@ -0,0 +1,31 @@
+in="example.lisp"
+out="highlighted.html"
+
+CC=gcc
+CFLAGS=-lfl -g
+LEX=flex
+YACC=bison -t -d
+
+.PHONY: all
+all: build-all webpage
+
+.PHONY: webpage
+webpage:
+ cat ./page_top.html > $(out)
+ ./a.out < $(in) >> $(out)
+ cat ./page_bottom.html >> $(out)
+
+build-all: build-bison build-flex
+ $(CC) lex.yy.c commonlisp2html.tab.c $(CFLAGS)
+
+.PHONY: build-flex
+build-flex: commonlisp2html.l
+ $(LEX) commonlisp2html.l
+
+.PHONY: build-bison
+build-bison: commonlisp2html.y
+ $(YACC) commonlisp2html.y
+
+.PHONY: clean
+clean:
+ rm -f a.out *.tab.* lex.yy.c