54 lines
1.2 KiB
Makefile
54 lines
1.2 KiB
Makefile
default :
|
|
@echo "Spécifiez une cible"
|
|
|
|
|
|
|
|
###########################
|
|
### NETTOYAGE ###
|
|
###########################
|
|
clean_all : clean clean_Inputs clean_Outputs
|
|
|
|
clean: clean_Lex_Yacc clean_Tables
|
|
@rm -f rondoudou_cross_assembleur
|
|
|
|
clean_Tables:
|
|
@rm -f Tables/*.o
|
|
|
|
clean_Lex_Yacc:
|
|
@rm -f Lex_Yacc/as.output Lex_Yacc/as.tab.* Lex_Yacc/lex.yy.* Lex_Yacc/as.dot
|
|
|
|
clean_Inputs:
|
|
@rm -f Inputs/*
|
|
|
|
clean_Outputs:
|
|
@rm -f Outputs/*
|
|
|
|
|
|
|
|
###########################
|
|
### COMPILATION ###
|
|
###########################
|
|
build : clean build_Tables build_Lex_Yacc
|
|
gcc Lex_Yacc/as.tab.o Lex_Yacc/lex.yy.o Tables/tables.o -ll -o rondoudou_cross_assembleur
|
|
|
|
build_Tables: clean_Tables
|
|
gcc -c Tables/tables.c -o Tables/tables.o
|
|
|
|
build_Lex_Yacc: clean_Lex_Yacc
|
|
bison -g -v -d -t -b Lex_Yacc/as Lex_Yacc/as.y
|
|
flex -o Lex_Yacc/lex.yy.c Lex_Yacc/al.lex
|
|
gcc -c Lex_Yacc/as.tab.c -o Lex_Yacc/as.tab.o
|
|
gcc -c Lex_Yacc/lex.yy.c -o Lex_Yacc/lex.yy.o
|
|
|
|
|
|
|
|
###########################
|
|
### EDITION ###
|
|
###########################
|
|
edit_Lex_Yacc:
|
|
pluma Lex_Yacc/al.lex Lex_Yacc/as.y &
|
|
|
|
edit_Tables:
|
|
pluma Tables/tables.c Tables/tables.h &
|
|
|
|
edit: edit_Lex_Yacc edit_Tables
|