Edit Makefiles

This commit is contained in:
Lucàs
2023-04-07 20:46:57 +02:00
parent f2e325c0e7
commit 94d40754b6
3 changed files with 20 additions and 12 deletions
+17
View File
@@ -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)
-3
View File
@@ -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
+3 -9
View File
@@ -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
rm -f lexer.ml parser.ml *.mli *.cmi *.cmo