forked from infancy/devlang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (56 loc) · 1.54 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
TARGET = crowbar
CC=gcc
OBJS = \
lex.yy.o\
y.tab.o\
main.o\
interface.o\
create.o\
execute.o\
eval.o\
string.o\
heap.o\
util.o\
native.o\
wchar.o\
error.o\
error_message.o\
./memory/mem.o\
./debug/dbg.o
CFLAGS = -c -g -Wall -Wswitch-enum -ansi -pedantic -DDEBUG -DSHIFT_JIS_SOURCE
INCLUDES = \
$(TARGET):$(OBJS)
cd ./memory; $(MAKE);
cd ./debug; $(MAKE);
$(CC) $(OBJS) -o $@ -lm -lmsvcp60
clean:
rm -f *.o lex.yy.c y.tab.c y.tab.h *~
y.tab.h : crowbar.y
bison --yacc -dv crowbar.y
y.tab.c : crowbar.y
bison --yacc -dv crowbar.y
lex.yy.c : crowbar.l crowbar.y y.tab.h
flex crowbar.l
y.tab.o: y.tab.c crowbar.h MEM.h
$(CC) -c -g $*.c $(INCLUDES)
lex.yy.o: lex.yy.c crowbar.h MEM.h
$(CC) -c -g $*.c $(INCLUDES)
.c.o:
$(CC) $(CFLAGS) $*.c $(INCLUDES)
./memory/mem.o:
cd ./memory; $(MAKE);
./debug/dbg.o:
cd ./debug; $(MAKE);
############################################################
create.o: create.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
error.o: error.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
error_message.o: error_message.c crowbar.h MEM.h CRB.h CRB_dev.h
eval.o: eval.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
execute.o: execute.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
heap.o: heap.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
interface.o: interface.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
main.o: main.c CRB.h MEM.h
native.o: native.c MEM.h DBG.h CRB_dev.h CRB.h crowbar.h
string.o: string.c MEM.h crowbar.h CRB.h CRB_dev.h
util.o: util.c MEM.h DBG.h crowbar.h CRB.h CRB_dev.h
wchar.o: wchar.c DBG.h crowbar.h MEM.h CRB.h CRB_dev.h