-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·37 lines (26 loc) · 911 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CPPFLAGS += -I/usr/local/pccts-1.33/include -I/usr/include/pccts
CXXFLAGS += -Wno-write-strings -g
all: cl
cl: cl.o codegen.o codegest.o ptype.o semantic.o symtab.o scan.o err.o util.o
$(CXX) -o $@ $^
cl.c err.c parser.dlg tokens.h: cl.g
antlr -gt $<
mode.h scan.c: parser.dlg
dlg -ci $< scan.c
cl.o: cl.c mode.h tokens.h myASTnode.hh
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
codegen.o codegest.o ptype.o semantic.o symtab.o util.o: %.o: %.cc %.hh myASTnode.hh
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
scan.o err.o: %.o: %.c
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
clean:
$(RM) cl cl.o codegen.o codegest.o err.o ptype.o scan.o semantic.o \
symtab.o util.o cl.c err.c mode.h parser.dlg scan.c tokens.h
jps := $(sort $(wildcard jp?)) $(sort $(wildcard jp??))
diff: cl
@for i in $(jps); do \
echo $$i; \
./cl execute < $$i > sortida; \
diff s$$i sortida; \
done
@$(RM) sortida