mirror of
https://github.com/LucasVbr/postscript-compiler.git
synced 2026-05-13 17:22:00 +00:00
Edit Makefiles
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
SRC_FOLDER=src/
|
||||
TEST_FOLDER=tests/
|
||||
|
||||
all: compile
|
||||
|
||||
compile:
|
||||
$(MAKE) -C $(SRC_FOLDER)
|
||||
|
||||
|
||||
.PHONY: clean tests
|
||||
|
||||
tests: compile
|
||||
./$(SRC_FOLDER)comp ./$(TEST_FOLDER)rectangles.c ./$(TEST_FOLDER)out/rectangles.ps
|
||||
./$(SRC_FOLDER)comp ./$(TEST_FOLDER)progsimple.c ./$(TEST_FOLDER)out/progsimple.ps
|
||||
|
||||
clean:
|
||||
$(MAKE) $@ -C $(SRC_FOLDER)
|
||||
@@ -1,9 +1,6 @@
|
||||
<h1 align="center">Welcome to Postscript Compiler 👋</h1>
|
||||
<p>
|
||||
<img alt="Version" src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" />
|
||||
<a href="#" target="_blank">
|
||||
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
> Compilateur du langage Postscript en Ocaml
|
||||
|
||||
+2
-8
@@ -1,5 +1,5 @@
|
||||
# Compile
|
||||
all: comp
|
||||
all: comp #lib
|
||||
|
||||
# Compilation of Ocaml files
|
||||
# Attention: order of object files important
|
||||
@@ -29,11 +29,9 @@ comp.cmo: comp.ml gen.cmo typing.cmo parser.cmo interf.cmo
|
||||
|
||||
# ocaml lexer and parser
|
||||
|
||||
# Comment in for your own lexer
|
||||
lexer.ml: lexer.mll lang.cmo
|
||||
ocamllex $<
|
||||
|
||||
# Comment in for your own parser
|
||||
parser.ml parser.mli: parser.mly lang.cmo
|
||||
ocamlyacc $<
|
||||
|
||||
@@ -55,10 +53,6 @@ parser.cmo: parser.ml parser.cmi lang.cmo
|
||||
# lib:
|
||||
# cp ../lib/* ./
|
||||
|
||||
## Remove compiled modules and lib
|
||||
## Remove compiled modules
|
||||
clean:
|
||||
rm -f lexer.ml parser.ml *.mli *.cmi *.cmo
|
||||
|
||||
## Run tests
|
||||
tests:
|
||||
./comp ./../tests/rectangles.c ./../tests/out/rectangles.ps
|
||||
Reference in New Issue
Block a user