feat: add standalone client with FIFO command interface
This commit is contained in:
committed by
Loic Coenen (aider)
parent
5ad831f50c
commit
998406616a
22
Makefile
Normal file
22
Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
# Top‑level Makefile – delegates build/clean/test to subdirectories
|
||||
|
||||
SUBDIRS = engine client
|
||||
|
||||
.PHONY: all build clean test $(SUBDIRS)
|
||||
|
||||
all: build
|
||||
|
||||
build: $(SUBDIRS)
|
||||
@echo "Build complete."
|
||||
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
test:
|
||||
$(MAKE) -C engine test
|
||||
|
||||
clean:
|
||||
@for dir in $(SUBDIRS); do \
|
||||
echo "Cleaning $$dir..."; \
|
||||
$(MAKE) -C $$dir clean; \
|
||||
done
|
||||
8
client/main.c
Normal file
8
client/main.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "tui.h"
|
||||
|
||||
int main(void) {
|
||||
tui_init();
|
||||
tui_run();
|
||||
tui_cleanup();
|
||||
return 0;
|
||||
}
|
||||
10
client/makefile
Normal file
10
client/makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -Wall -Wextra -g -Isrc
|
||||
LDFLAGS ?= -lncurses -lm
|
||||
|
||||
looper-client: src/tui.c main.c
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f looper-client
|
||||
1570
client/src/tui.c
1570
client/src/tui.c
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,8 @@
|
||||
#ifndef TUI_H
|
||||
#define TUI_H
|
||||
|
||||
#include "engine.h"
|
||||
#include "dispatcher.h"
|
||||
|
||||
#define NUM_GRIDS 8
|
||||
|
||||
// Initialize TUI
|
||||
void tui_init(Engine *engine);
|
||||
|
||||
// Run the TUI main loop
|
||||
void tui_run(Engine *engine);
|
||||
|
||||
// Cleanup TUI
|
||||
void tui_init(void);
|
||||
void tui_run(void);
|
||||
void tui_cleanup(void);
|
||||
|
||||
#endif // TUI_H
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user