-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.msc
147 lines (127 loc) · 3.78 KB
/
Makefile.msc
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
NAME = kcs
CC = cl
LINK = link
CFLAGS = /O2 /MT /Iinclude /DONIG_EXTERN=extern /DAES256=1
LFLAGS =
MAINOBJ = \
src/kcs.obj
OBJS = \
src/kcsmain.obj \
src/kcsutil.obj \
src/context.obj \
src/util/argparse.obj \
src/util/fmemopen.obj \
src/util/hash.obj \
src/util/string.obj \
src/backend/x86_64/instr.obj \
src/backend/x86_64/jit_util.obj \
src/backend/x86_64/jit.obj \
src/backend/x86_64/dwarf.obj \
src/backend/x86_64/elf.obj \
src/backend/x86_64/abi.obj \
src/backend/x86_64/assemble.obj \
src/backend/vm/vmdump.obj \
src/backend/vm/vminstr.obj \
src/backend/vm/vmrunlir.obj \
src/backend/vm/vmimplir.obj \
src/backend/vm/vmsevelir.obj \
src/backend/compile.obj \
src/backend/graphviz/dot.obj \
src/backend/linker.obj \
src/optimizer/transform.obj \
src/optimizer/liveness.obj \
src/optimizer/optimize.obj \
src/preprocessor/tokenize.obj \
src/preprocessor/strtab.obj \
src/preprocessor/input.obj \
src/preprocessor/directive.obj \
src/preprocessor/preprocess.obj \
src/preprocessor/macro.obj \
src/parser/typetree.obj \
src/parser/symtab.obj \
src/parser/parse.obj \
src/parser/statement.obj \
src/parser/initializer.obj \
src/parser/expression.obj \
src/parser/declaration.obj \
src/parser/eval.obj
BUILTIN = \
src/backend/vm/builtin/vmbuiltin.obj \
src/backend/vm/builtin/vmacpconv.obj
JIT = \
src/backend/x86_64/builtin/jitbuiltin.obj \
src/backend/vm/builtin/vmacpconv.obj
EXTOBJ = \
src/_extdll/ext.obj \
src/_extdll/ext/aesx.obj \
src/_extdll/ext/fileio.obj \
src/_extdll/ext/regex.obj \
src/_extdll/ext/sqlite3x.obj \
src/_extdll/ext/timer.obj \
src/_extdll/ext/zip_unzip.obj \
src/_extdll/lib/aes/aes.obj \
src/_extdll/lib/zip/miniz.obj \
src/_extdll/lib/sqlite3/sqlite3.obj \
src/_extdll/lib/fileio/_fileio.obj \
src/_extdll/lib/fileio/fclose.obj \
src/_extdll/lib/fileio/feof.obj \
src/_extdll/lib/fileio/fflush.obj \
src/_extdll/lib/fileio/fgetc.obj \
src/_extdll/lib/fileio/fgetpos.obj \
src/_extdll/lib/fileio/fgets.obj \
src/_extdll/lib/fileio/fopen.obj \
src/_extdll/lib/fileio/fprintf.obj \
src/_extdll/lib/fileio/fputc.obj \
src/_extdll/lib/fileio/fputs.obj \
src/_extdll/lib/fileio/fread.obj \
src/_extdll/lib/fileio/fseek.obj \
src/_extdll/lib/fileio/fsetpos.obj \
src/_extdll/lib/fileio/ftell.obj \
src/_extdll/lib/fileio/fwrite.obj \
src/_extdll/lib/fileio/rewind.obj \
src/_extdll/lib/fileio/ungetc.obj \
src/_extdll/lib/fileio/vfprintf.obj \
src/_extdll/lib/fileio/vprintf.obj
.SUFFIXES :
.SUFFIXES : .c .obj
all: ext_json.c libs $(NAME).exe $(NAME)bltin.dll $(NAME)jit.dll kcsext.dll
test: all
test\test-8cc\test.cmd
test\test-qcc\test.cmd
test\test-lacc\test.cmd
test\test-picoc\test.cmd
test\test-picoc\csmith.cmd
test\test-8cc\test.cmd -j
test\test-qcc\test.cmd -j
test\test-lacc\test.cmd -j
test\test-picoc\test.cmd -j
test\test-picoc\csmith.cmd -j
ext_json.c: myacc.exe kcsrt\libsrc\kcs\json.y
myacc -y __json_yy -Y JSON_YY kcsrt\libsrc\kcs\json.y
move /y y.tab.c kcsrt\libsrc\kcs\ext_json.c
myacc.exe:
$(CC) $(CFLAGS) /Femyacc.exe utility\myacc.c
libs: onig_s.lib
onig_s.lib:
cd src/_extdll/lib/onig
make_win64.bat
cd ../../../../
copy /y src\_extdll\lib\onig\onig_s.lib .
clean:
del /S *.exe *.obj *.dll *.lib > NUL
del *.exp > NUL
cd src/_extdll/lib/onig
make_win64.bat clean
cd ../../../../
$(NAME)ext.dll: $(EXTOBJ)
$(CC) /Fe$(NAME)ext.dll /LD $(EXTOBJ) onig_s.lib
$(NAME).exe: lib$(NAME).dll
$(CC) $(CFLAGS) /Fe$(NAME).exe $(MAINOBJ:.obj=.c) lib$(NAME).lib
lib$(NAME).dll: $(OBJS)
$(CC) /LD /Felib$(NAME).dll $(OBJS)
$(NAME)bltin.dll: $(BUILTIN)
$(CC) $(CFLAGS) /LD /Fe$(NAME)bltin.dll $(BUILTIN:.obj=.c) src\kcsutil.obj src/util/string.obj
$(NAME)jit.dll: $(JIT)
$(CC) $(CFLAGS) /LD /Fe$(NAME)jit.dll $(JIT:.obj=.c) src\kcsutil.obj src/util/string.obj
.c.obj:
$(CC) -c $(CFLAGS) -Fo$*.obj $<