Project refactoring changed xtlite to xtc everywhere.

This commit is contained in:
Johannes Findeisen 2026-10-26 23:07:03 +01:00
commit 71f7b4d96b
16 changed files with 60 additions and 60 deletions

View file

@ -11,7 +11,7 @@ CXXFLAGS ?= -O2 -g
CXXFLAGS += -std=c++17 -Wall -Wextra -Wpedantic -Iinclude CXXFLAGS += -std=c++17 -Wall -Wextra -Wpedantic -Iinclude
LDFLAGS ?= LDFLAGS ?=
CORE_SOURCES := src/core/xtlite.c src/graph/graph.c src/dsp/gain.c src/engine/offline_engine.c CORE_SOURCES := src/core/xtc.c src/graph/graph.c src/dsp/gain.c src/engine/offline_engine.c
CORE_OBJECTS := $(CORE_SOURCES:%.c=$(BUILD_DIR)/%.o) CORE_OBJECTS := $(CORE_SOURCES:%.c=$(BUILD_DIR)/%.o)
TEST_OBJECT := $(BUILD_DIR)/tests/unit/test_core.o TEST_OBJECT := $(BUILD_DIR)/tests/unit/test_core.o
ifeq ($(shell $(PKG_CONFIG) --exists fltk 2>/dev/null && echo yes),yes) ifeq ($(shell $(PKG_CONFIG) --exists fltk 2>/dev/null && echo yes),yes)
@ -25,12 +25,12 @@ GUI_AVAILABLE := yes
endif endif
.PHONY: all clean test debug gui install .PHONY: all clean test debug gui install
all: $(BUILD_DIR)/libxtlite.a $(BUILD_DIR)/xtlite-check all: $(BUILD_DIR)/libxtc.a $(BUILD_DIR)/xtc-check
$(BUILD_DIR)/xtlite-check: $(BUILD_DIR)/src/main.o $(BUILD_DIR)/libxtlite.a $(BUILD_DIR)/xtc-check: $(BUILD_DIR)/src/main.o $(BUILD_DIR)/libxtc.a
$(CC) $(LDFLAGS) -o $@ $^ -lm $(CC) $(LDFLAGS) -o $@ $^ -lm
$(BUILD_DIR)/libxtlite.a: $(CORE_OBJECTS) $(BUILD_DIR)/libxtc.a: $(CORE_OBJECTS)
@mkdir -p $(@D) @mkdir -p $(@D)
$(AR) rcs $@ $^ $(AR) rcs $@ $^
@ -46,20 +46,20 @@ $(TEST_OBJECT): tests/unit/test_core.c
@mkdir -p $(@D) @mkdir -p $(@D)
$(CC) $(CFLAGS) -MMD -MP -c $< -o $@ $(CC) $(CFLAGS) -MMD -MP -c $< -o $@
$(BUILD_DIR)/test_core: $(TEST_OBJECT) $(BUILD_DIR)/libxtlite.a $(BUILD_DIR)/test_core: $(TEST_OBJECT) $(BUILD_DIR)/libxtc.a
$(CC) $(LDFLAGS) -o $@ $(TEST_OBJECT) $(BUILD_DIR)/libxtlite.a -lm $(CC) $(LDFLAGS) -o $@ $(TEST_OBJECT) $(BUILD_DIR)/libxtc.a -lm
test: $(BUILD_DIR)/test_core $(BUILD_DIR)/xtlite-check test: $(BUILD_DIR)/test_core $(BUILD_DIR)/xtc-check
./$(BUILD_DIR)/test_core ./$(BUILD_DIR)/test_core
./$(BUILD_DIR)/xtlite-check ./$(BUILD_DIR)/xtc-check
debug: debug:
$(MAKE) BUILD_DIR="$(BUILD_DIR)/debug" CFLAGS="$(CFLAGS) -O0 -g3" CXXFLAGS="$(CXXFLAGS) -O0 -g3" all test $(MAKE) BUILD_DIR="$(BUILD_DIR)/debug" CFLAGS="$(CFLAGS) -O0 -g3" CXXFLAGS="$(CXXFLAGS) -O0 -g3" all test
ifeq ($(GUI_AVAILABLE),yes) ifeq ($(GUI_AVAILABLE),yes)
gui: $(BUILD_DIR)/xtlite gui: $(BUILD_DIR)/xtc
$(BUILD_DIR)/xtlite: $(BUILD_DIR)/src/gui/main.o $(BUILD_DIR)/src/gui/main_window.o $(BUILD_DIR)/libxtlite.a $(BUILD_DIR)/xtc: $(BUILD_DIR)/src/gui/main.o $(BUILD_DIR)/src/gui/main_window.o $(BUILD_DIR)/libxtc.a
$(CXX) $(LDFLAGS) -o $@ $^ $(FLTK_LIBS) -lm $(CXX) $(LDFLAGS) -o $@ $^ $(FLTK_LIBS) -lm
else else
gui: gui:
@ -68,9 +68,9 @@ gui:
endif endif
install: all install: all
install -d "$(DESTDIR)$(PREFIX)/include/xtlite" "$(DESTDIR)$(PREFIX)/lib" install -d "$(DESTDIR)$(PREFIX)/include/xtc" "$(DESTDIR)$(PREFIX)/lib"
install -m 0644 include/xtlite/*.h "$(DESTDIR)$(PREFIX)/include/xtlite/" install -m 0644 include/xtc/*.h "$(DESTDIR)$(PREFIX)/include/xtc/"
install -m 0644 "$(BUILD_DIR)/libxtlite.a" "$(DESTDIR)$(PREFIX)/lib/" install -m 0644 "$(BUILD_DIR)/libxtc.a" "$(DESTDIR)$(PREFIX)/lib/"
clean: clean:
rm -rf "$(BUILD_DIR)" rm -rf "$(BUILD_DIR)"

View file

@ -1,6 +1,6 @@
# xtc — a lightweight, modular DAW # xtc — a lightweight, modular DAW
`xtlite` is a new, energyXT-inspired digital audio workstation project. It is not a clone and contains no energyXT source code or assets. `xtc` is a new, energyXT-inspired digital audio workstation project. It is not a clone and contains no energyXT source code or assets.
## Design decisions ## Design decisions
@ -31,7 +31,7 @@ make
make test make test
``` ```
`make` also builds `build/xtlite-check`, a headless core startup/shutdown `make` also builds `build/xtc-check`, a headless core startup/shutdown
check. Use `make debug` for a separate debug build and test run. See check. Use `make debug` for a separate debug build and test run. See
[docs/BUILD.md](docs/BUILD.md) for the inspected toolchain and baseline limits. [docs/BUILD.md](docs/BUILD.md) for the inspected toolchain and baseline limits.
@ -44,7 +44,7 @@ make gui
Run the GUI: Run the GUI:
```sh ```sh
./build/xtlite ./build/xtc
``` ```
The current GUI is only a shell and does not yet produce sound. The core's offline graph test is the first executable audio-processing milestone. The current GUI is only a shell and does not yet produce sound. The core's offline graph test is the first executable audio-processing milestone.

View file

@ -1,6 +1,6 @@
# Build baseline # Build baseline
Phase 0 retains the existing layout: public C headers in `include/xtlite`, Phase 0 retains the existing layout: public C headers in `include/xtc`,
C implementation modules under `src`, optional C++ GUI under `src/gui`, and C implementation modules under `src`, optional C++ GUI under `src/gui`, and
tests under `tests`. `src/main.c` is a minimal headless startup/shutdown check; tests under `tests`. `src/main.c` is a minimal headless startup/shutdown check;
it does not initialize audio devices or open a GUI. it does not initialize audio devices or open a GUI.
@ -9,7 +9,7 @@ it does not initialize audio devices or open a GUI.
```sh ```sh
make clean all test make clean all test
./build/xtlite-check ./build/xtc-check
make debug make debug
make gui make gui
``` ```

View file

@ -132,7 +132,7 @@ The C core and audio engine may be separate libraries or clearly separated modul
Adapt this to an existing repository instead of replacing it blindly. Adapt this to an existing repository instead of replacing it blindly.
```text ```text
xtlite/ xtc/
├── README.md ├── README.md
├── LICENSE ├── LICENSE
├── Makefile ├── Makefile
@ -147,12 +147,12 @@ xtlite/
│ ├── 0002-c-core-fltk-gui.md │ ├── 0002-c-core-fltk-gui.md
│ └── 0003-realtime-thread-rules.md │ └── 0003-realtime-thread-rules.md
├── include/ ├── include/
│ └── xtlite/ │ └── xtc/
│ ├── xtlite.h │ ├── xtc.h
│ ├── xtlite_types.h │ ├── xtc_types.h
│ ├── xtlite_project.h │ ├── xtc_project.h
│ ├── xtlite_engine.h │ ├── xtc_engine.h
│ └── xtlite_version.h │ └── xtc_version.h
├── src/ ├── src/
│ ├── core/ │ ├── core/
│ ├── project/ │ ├── project/
@ -222,8 +222,8 @@ Keep C and C++ files clearly separated. C headers exposed to C++ must use `exter
Example API shape (illustrative only; refine after reviewing the actual codebase): Example API shape (illustrative only; refine after reviewing the actual codebase):
```c ```c
#ifndef XTLITE_H #ifndef XTC_H
#define XTLITE_H #define XTC_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -1,15 +1,15 @@
#ifndef XTLITE_H #ifndef XTC_H
#define XTLITE_H #define XTC_H
#include "xtlite_types.h" #include "xtc_types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define XTLITE_VERSION_MAJOR 0 #define XTC_VERSION_MAJOR 0
#define XTLITE_VERSION_MINOR 1 #define XTC_VERSION_MINOR 1
#define XTLITE_VERSION_PATCH 0 #define XTC_VERSION_PATCH 0
typedef struct xt_app xt_app; typedef struct xt_app xt_app;

View file

@ -1,7 +1,7 @@
#ifndef XTLITE_ENGINE_H #ifndef XTC_ENGINE_H
#define XTLITE_ENGINE_H #define XTC_ENGINE_H
#include "xtlite_types.h" #include "xtc_types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -1,7 +1,7 @@
#ifndef XTLITE_PROJECT_H #ifndef XTC_PROJECT_H
#define XTLITE_PROJECT_H #define XTC_PROJECT_H
#include "xtlite_types.h" #include "xtc_types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -1,5 +1,5 @@
#ifndef XTLITE_TYPES_H #ifndef XTC_TYPES_H
#define XTLITE_TYPES_H #define XTC_TYPES_H
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>

View file

@ -0,0 +1,7 @@
#ifndef XTC_VERSION_H
#define XTC_VERSION_H
#define XTC_VERSION_STRING "0.1.0"
#define XTC_PROJECT_NAME "xtc"
#endif

View file

@ -1,7 +0,0 @@
#ifndef XTLITE_VERSION_H
#define XTLITE_VERSION_H
#define XTLITE_VERSION_STRING "0.1.0"
#define XTLITE_PROJECT_NAME "xtlite"
#endif

View file

@ -1,4 +1,4 @@
#include "xtlite/xtlite.h" #include "xtc/xtc.h"
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,4 @@
#include "xtlite/xtlite_engine.h" #include "xtc/xtc_engine.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View file

@ -6,11 +6,11 @@
#include <FL/Fl_Group.H> #include <FL/Fl_Group.H>
extern "C" { extern "C" {
#include "xtlite/xtlite.h" #include "xtc/xtc.h"
} }
MainWindow::MainWindow() MainWindow::MainWindow()
: Fl_Double_Window(1000, 680, "xtlite — modular audio workstation") : Fl_Double_Window(1000, 680, "xtc — modular audio workstation")
{ {
begin(); begin();

View file

@ -1,5 +1,5 @@
#ifndef XTLITE_MAIN_WINDOW_HPP #ifndef XTC_MAIN_WINDOW_HPP
#define XTLITE_MAIN_WINDOW_HPP #define XTC_MAIN_WINDOW_HPP
#include <FL/Fl_Double_Window.H> #include <FL/Fl_Double_Window.H>

View file

@ -1,5 +1,5 @@
#include "xtlite/xtlite.h" #include "xtc/xtc.h"
#include "xtlite/xtlite_version.h" #include "xtc/xtc_version.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -17,7 +17,7 @@ int main(void)
xt_app_destroy(app); xt_app_destroy(app);
if (printf("%s %s: core startup/shutdown OK\n", if (printf("%s %s: core startup/shutdown OK\n",
XTLITE_PROJECT_NAME, XTLITE_VERSION_STRING) < 0) { XTC_PROJECT_NAME, XTC_VERSION_STRING) < 0) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;

View file

@ -1,5 +1,5 @@
#include "xtlite/xtlite.h" #include "xtc/xtc.h"
#include "xtlite/xtlite_engine.h" #include "xtc/xtc_engine.h"
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
@ -38,6 +38,6 @@ int main(void)
CHECK(xt_graph_validate(graph) == XT_ERR_GRAPH_CYCLE); CHECK(xt_graph_validate(graph) == XT_ERR_GRAPH_CYCLE);
xt_graph_destroy(graph); xt_graph_destroy(graph);
(void)puts("All xtlite core tests passed."); (void)puts("All xtc core tests passed.");
return 0; return 0;
} }