diff options
author | Adam NAILI | 2018-04-22 14:49:42 +0200 |
---|---|---|
committer | Adam NAILI | 2018-04-22 14:49:42 +0200 |
commit | 40f423a4b3b1e64e8424ab239cc14ecc5077640f (patch) | |
tree | c7da7c2eed97d62cc8ab2e003293935cda5a93dc /makefile | |
parent | c0802bc17f856546b95a5b51252f7a35d9e1ab10 (diff) | |
download | tpc-compiler-40f423a4b3b1e64e8424ab239cc14ecc5077640f.tar.gz |
Beginning of the symbol table implementation
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -10,6 +10,7 @@ DOC_DIR := doc | |||
10 | LEX_SRC := tpc.lex | 10 | LEX_SRC := tpc.lex |
11 | YACC_SRC := tpc.y | 11 | YACC_SRC := tpc.y |
12 | PDF_SRC := rapport.md | 12 | PDF_SRC := rapport.md |
13 | ST_SRC := symboltable | ||
13 | 14 | ||
14 | # INTERMEDIATE | 15 | # INTERMEDIATE |
15 | LEX_GEN := tpc.yy | 16 | LEX_GEN := tpc.yy |
@@ -34,8 +35,8 @@ all: clean $(OUT_DIR)/$(COMPIL_BIN) | |||
34 | $(OUT_DIR)/$(LEX_GEN).c: $(SRC_DIR)/$(LEX_SRC) | 35 | $(OUT_DIR)/$(LEX_GEN).c: $(SRC_DIR)/$(LEX_SRC) |
35 | $(LEX) -o $@ $^ | 36 | $(LEX) -o $@ $^ |
36 | 37 | ||
37 | $(OUT_DIR)/$(YACC_GEN).c $(OUT_DIR)/$(YACC_GEN).h: $(SRC_DIR)/$(YACC_SRC) | 38 | $(OUT_DIR)/$(YACC_GEN).c $(OUT_DIR)/$(YACC_GEN).h: $(SRC_DIR)/$(YACC_SRC) $(SRC_DIR)/$(ST_SRC).h |
38 | $(YACC) --output=$(OUT_DIR)/$(YACC_GEN).c --defines=$(OUT_DIR)/$(YACC_GEN).h -v $^ | 39 | $(YACC) --output=$(OUT_DIR)/$(YACC_GEN).c --defines=$(OUT_DIR)/$(YACC_GEN).h -v $< |
39 | 40 | ||
40 | $(OUT_DIR)/$(LEX_GEN).o: $(OUT_DIR)/$(LEX_GEN).c $(OUT_DIR)/$(YACC_GEN).h | 41 | $(OUT_DIR)/$(LEX_GEN).o: $(OUT_DIR)/$(LEX_GEN).c $(OUT_DIR)/$(YACC_GEN).h |
41 | $(CC) -o $@ -c $< $(IFLAGS) $(LFLAGS) $(CFLAGS) | 42 | $(CC) -o $@ -c $< $(IFLAGS) $(LFLAGS) $(CFLAGS) |
@@ -43,7 +44,10 @@ $(OUT_DIR)/$(LEX_GEN).o: $(OUT_DIR)/$(LEX_GEN).c $(OUT_DIR)/$(YACC_GEN).h | |||
43 | $(OUT_DIR)/$(YACC_GEN).o: $(OUT_DIR)/$(YACC_GEN).c | 44 | $(OUT_DIR)/$(YACC_GEN).o: $(OUT_DIR)/$(YACC_GEN).c |
44 | $(CC) -o $@ -c $^ $(IFLAGS) $(LFLAGS) $(CFLAGS) | 45 | $(CC) -o $@ -c $^ $(IFLAGS) $(LFLAGS) $(CFLAGS) |
45 | 46 | ||
46 | $(OUT_DIR)/$(COMPIL_BIN): $(OUT_DIR)/$(LEX_GEN).o $(OUT_DIR)/$(YACC_GEN).o | 47 | $(OUT_DIR)/$(ST_SRC).o: $(SRC_DIR)/$(ST_SRC).c |
48 | $(CC) -o $@ -c $^ $(IFLAGS) $(LFLAGS) $(CFLAGS) | ||
49 | |||
50 | $(OUT_DIR)/$(COMPIL_BIN): $(OUT_DIR)/$(LEX_GEN).o $(OUT_DIR)/$(YACC_GEN).o $(OUT_DIR)/$(ST_SRC).o | ||
47 | $(CC) -o $@ $^ $(IFLAGS) $(LFLAGS) $(CFLAGS) | 51 | $(CC) -o $@ $^ $(IFLAGS) $(LFLAGS) $(CFLAGS) |
48 | 52 | ||
49 | $(OUT_DIR)/$(REPORT_PDF): $(DOC_DIR)/$(PDF_SRC) | 53 | $(OUT_DIR)/$(REPORT_PDF): $(DOC_DIR)/$(PDF_SRC) |