@@ -111,32 +111,33 @@ pub fn build(b: *std.build.Builder) !void {
111
111
var make = try Maker .init (b );
112
112
make .enable_lto = b .option (bool , "lto" , "Enable LTO optimization, (default: false)" ) orelse false ;
113
113
114
- const ggml = make .obj ("ggml" , "ggml.c" );
115
- const sgemm = make .obj ("sgemm" , "sgemm.cpp" );
116
- const ggml_alloc = make .obj ("ggml-alloc" , "ggml-alloc.c" );
117
- const ggml_backend = make .obj ("ggml-backend" , "ggml-backend.c" );
118
- const ggml_quants = make .obj ("ggml-quants" , "ggml-quants.c" );
119
- const unicode = make .obj ("unicode" , "unicode.cpp" );
120
- const unicode_data = make .obj ("unicode-data" , "unicode-data.cpp" );
121
- const llama = make .obj ("llama" , "llama.cpp" );
122
- const buildinfo = make .obj ("common" , "common/build-info.cpp" );
123
- const common = make .obj ("common" , "common/common.cpp" );
124
- const console = make .obj ("console" , "common/console.cpp" );
125
- const sampling = make .obj ("sampling" , "common/sampling.cpp" );
126
- const grammar_parser = make .obj ("grammar-parser" , "common/grammar-parser.cpp" );
127
- const json_schema_to_grammar = make .obj ("json-schema-to-grammar" , "common/json-schema-to-grammar.cpp" );
128
- const train = make .obj ("train" , "common/train.cpp" );
129
- const clip = make .obj ("clip" , "examples/llava/clip.cpp" );
130
- const llava = make .obj ("llava" , "examples/llava/llava.cpp" );
131
-
132
- _ = make .exe ("main" , "examples/main/main.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo , sampling , console , grammar_parser });
133
- _ = make .exe ("quantize" , "examples/quantize/quantize.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo });
134
- _ = make .exe ("perplexity" , "examples/perplexity/perplexity.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo });
135
- _ = make .exe ("embedding" , "examples/embedding/embedding.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo });
136
- _ = make .exe ("finetune" , "examples/finetune/finetune.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo , train });
137
- _ = make .exe ("train-text-from-scratch" , "examples/train-text-from-scratch/train-text-from-scratch.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo , train });
138
-
139
- const server = make .exe ("server" , "examples/server/server.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , json_schema_to_grammar , buildinfo , sampling , grammar_parser , clip , llava });
114
+ const ggml = make .obj ("ggml" , "ggml.c" );
115
+ const sgemm = make .obj ("sgemm" , "sgemm.cpp" );
116
+ const ggml_alloc = make .obj ("ggml-alloc" , "ggml-alloc.c" );
117
+ const ggml_backend = make .obj ("ggml-backend" , "ggml-backend.c" );
118
+ const ggml_quants = make .obj ("ggml-quants" , "ggml-quants.c" );
119
+ const unicode = make .obj ("unicode" , "unicode.cpp" );
120
+ const unicode_data = make .obj ("unicode-data" , "unicode-data.cpp" );
121
+ const llama = make .obj ("llama" , "llama.cpp" );
122
+ const common = make .obj ("common" , "common/build-info.cpp" ,
123
+ "common/common.cpp" ,
124
+ "common/console.cpp" ,
125
+ "common/sampling.cpp" ,
126
+ "common/grammar-parser.cpp" ,
127
+ "common/json-schema-to-grammar.cpp" ,
128
+ "common/train.cpp" );
129
+ const clip = make .obj ("clip" , "examples/llava/clip.cpp" );
130
+ const llava = make .obj ("llava" , "examples/llava/llava.cpp" );
131
+
132
+ _ = make .exe ("main" , "examples/main/main.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common });
133
+ _ = make .exe ("quantize" , "examples/quantize/quantize.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common });
134
+ _ = make .exe ("perplexity" , "examples/perplexity/perplexity.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common });
135
+ _ = make .exe ("embedding" , "examples/embedding/embedding.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common });
136
+ _ = make .exe ("finetune" , "examples/finetune/finetune.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common });
137
+
138
+ _ = make .exe ("train-text-from-scratch" , "examples/train-text-from-scratch/train-text-from-scratch.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common });
139
+
140
+ const server = make .exe ("server" , "examples/server/server.cpp" , &.{ ggml , sgemm , ggml_alloc , ggml_backend , ggml_quants , llama , unicode , unicode_data , common , clip , llava });
140
141
if (server .target .isWindows ()) {
141
142
server .linkSystemLibrary ("ws2_32" );
142
143
}
0 commit comments