Skip to content

Commit 97317c7

Browse files
committed
Add --simple-io option for subprocesses and break out console.h and cpp
1 parent 7e4ea5b commit 97317c7

File tree

7 files changed

+530
-428
lines changed

7 files changed

+530
-428
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ llama.o: llama.cpp ggml.h ggml-cuda.h llama.h llama-util.h
195195
common.o: examples/common.cpp examples/common.h
196196
$(CXX) $(CXXFLAGS) -c $< -o $@
197197

198+
console.o: examples/console.cpp examples/console.h
199+
$(CXX) $(CXXFLAGS) -c $< -o $@
200+
198201
libllama.so: llama.o ggml.o $(OBJS)
199202
$(CXX) $(CXXFLAGS) -shared -fPIC -o $@ $^ $(LDFLAGS)
200203

@@ -205,7 +208,7 @@ clean:
205208
# Examples
206209
#
207210

208-
main: examples/main/main.cpp build-info.h ggml.o llama.o common.o $(OBJS)
211+
main: examples/main/main.cpp build-info.h ggml.o llama.o common.o console.o $(OBJS)
209212
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
210213
@echo
211214
@echo '==== Run ./main -h for help. ===='

examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
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
)
1719

1820
if (BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)