-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.win
84 lines (64 loc) · 1.84 KB
/
makefile.win
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
CFLAGS=/nologo /W3 /DWINDOWS
LINK=link
# for debugging the rule grammar
!ifdef YYDEBUG
CFLAGS=$(CFLAGS) /DYYDEBUG=1
!endif
!ifdef BUILD_OPT
CFLAGS=$(CFLAGS) /O1 /DNDEBUG /UDEBUG
LFLAGS=$(LFLAGS)
!else
CFLAGS=$(CFLAGS) /Zi /Od /UNDEBUG /DDEBUG /MDd
LFLAGS=$(LFLAGS) /debug
!endif
SHARED_OBJS = \
ht.obj \
debug.obj \
$(NULL)
RUNTIME_OBJS = \
alloc.obj \
agent.obj \
rete.obj \
wmem.obj \
$(NULL)
PARSER_OBJS = \
y.tab.obj \
lex.yy.obj \
prod.obj \
symtab.obj \
$(NULL)
TINYSOAR_OBJS = \
tinysoar.obj \
export.obj \
$(NULL)
all: tinysoar.dll
y.tab.obj: y.tab.c
y.tab.c y.tab.h: rule.y
bison --yacc --defines $**
lex.yy.c: rule.l
flex $**
lex.yy.obj: lex.yy.c y.tab.h
TCL_DIR=c:\tcl
TINYSOAR_LIBS=$(TCL_DIR)\lib\tcl83.lib
tinysoar.dll: $(TINYSOAR_OBJS) $(PARSER_OBJS) $(RUNTIME_OBJS) $(SHARED_OBJS)
$(LINK) $(LFLAGS) $(TINYSOAR_LIBS) /dll /out:$@ $**
tinysoar.obj: tinysoar.c soar.h symtab.h parser.h alloc.h config.h defs.h
$(CC) /c $(CFLAGS) /I$(TCL_DIR)\include tinysoar.c
alloc.obj: alloc.c alloc.h config.h defs.h
agent.obj: agent.c soar.h alloc.h config.h defs.h
export.obj: export.c soar.h ht.h symtab.h alloc.h config.h defs.h
ht.obj: ht.c ht.h alloc.h config.h defs.h
prod.obj: prod.c soar.h rete.h alloc.h config.h defs.h
rete.obj: rete.c soar.h rete.h alloc.h config.h defs.h
runtime.obj: runtime.c config.h defs.h
symtab.obj: symtab.c soar.h config.h defs.h
wmem.obj: wmem.c soar.h ht.h alloc.h config.h defs.h
defs.h:
echo /* Generated by makefile.win */ > $@
echo #define inline __inline >> $@
echo #define HAVE_MALLOC_H 1 >> $@
echo #define SIZEOF_INT 4 >> $@
clean:
-del *.obj *.dll *.exp *.opt *.exe *.lib *.pdb *.ilk rule.output y.tab.* lex.yy.c .*~ *~
distclean: clean
-del defs.h