Skip to content

Commit 3498588

Browse files
Add --simple-io option for subprocesses and break out console.h and cpp (ggml-org#1558)
1 parent 5f631c2 commit 3498588

File tree

7 files changed

+536
-435
lines changed

7 files changed

+536
-435
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ llama.o: llama.cpp ggml.h ggml-alloc.h ggml-cuda.h ggml-metal.h llama.h llama-ut
340340
common.o: examples/common.cpp examples/common.h
341341
$(CXX) $(CXXFLAGS) -c $< -o $@
342342

343+
console.o: examples/console.cpp examples/console.h
344+
$(CXX) $(CXXFLAGS) -c $< -o $@
345+
343346
grammar-parser.o: examples/grammar-parser.cpp examples/grammar-parser.h
344347
$(CXX) $(CXXFLAGS) -c $< -o $@
345348

@@ -353,7 +356,7 @@ clean:
353356
# Examples
354357
#
355358

356-
main: examples/main/main.cpp build-info.h ggml.o llama.o common.o grammar-parser.o $(OBJS)
359+
main: examples/main/main.cpp build-info.h ggml.o llama.o common.o console.o grammar-parser.o $(OBJS)
357360
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
358361
@echo
359362
@echo '==== Run ./main -h for help. ===='

examples/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ set(TARGET common)
1313
add_library(${TARGET} OBJECT
1414
common.h
1515
common.cpp
16+
console.h
17+
console.cpp
1618
grammar-parser.h
1719
grammar-parser.cpp
1820
)

0 commit comments

Comments
 (0)