compiles fine
This commit is contained in:
parent
b517afbfad
commit
815c9db00d
12 changed files with 79 additions and 90 deletions
32
Makefile
Normal file
32
Makefile
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
YACC = yacc
|
||||
YFLAGS = -d
|
||||
|
||||
CC = gcc
|
||||
CFLAGS =
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
|
||||
EXEC =
|
||||
|
||||
.PHONY: all clean
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
OBJS = gspa.o gsp_act.o gsp_eval.o gsp_inst.o gsp_lex.o gsp_out.o gsp_pseu.o gsp_sym.o gsp_gram.o
|
||||
|
||||
gspa$(EXEC): $(OBJS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
gspa.o: gspa.c gsp_gram.c
|
||||
gsp_lex.o: gsp_lex.c gsp_gram.c
|
||||
gsp_eval.o: gsp_eval.c gsp_gram.c
|
||||
|
||||
gsp_gram.c: gsp_gram.y
|
||||
$(YACC) $(YFLAGS) gsp_gram.y
|
||||
mv y.tab.c $@
|
||||
mv y.tab.h gsp_gram.h
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f gspa *.exe *.o gsp_gram.c gsp_gram.h
|
||||
Loading…
Add table
Add a link
Reference in a new issue