11# TurboQuant.cpp — Standalone Makefile (no CMake needed)
22#
33# Usage:
4- # make # build tq_run + tq_convert
5- # make tq_run # inference tool only
4+ # make # build quant + tq_convert
5+ # make quant # inference tool only
66# make test # build and run tests (requires Google Test)
77# make clean # remove build artifacts
88#
99# Cross-platform:
1010# Linux/gcc: make CC=gcc
1111# macOS/clang: make (auto-detects Apple Silicon)
1212# macOS+Metal: make METAL=1 (enables Metal GPU backend)
13- # Windows/mingw: make CC=x86_64-w64-mingw32-gcc TARGET=tq_run .exe
13+ # Windows/mingw: make CC=x86_64-w64-mingw32-gcc TARGET=quant .exe
1414#
1515# Options:
1616# DEBUG=1 — debug build (-g -O0 -fsanitize=address)
@@ -87,14 +87,14 @@ endif
8787
8888.PHONY : all clean test
8989
90- all : tq_run tq_convert
90+ all : quant tq_convert
9191
9292# Static library
9393libturboquant.a : $(OBJ_LIB )
9494 $(AR ) rcs $@ $^
9595
9696# Main tools
97- tq_run : tools/tq_run .c libturboquant.a
97+ quant : tools/quant .c libturboquant.a
9898 $(CC ) $(CFLAGS ) -o $@ $< -L. -lturboquant $(LDFLAGS )
9999
100100tq_convert : tools/tq_convert.c libturboquant.a
@@ -115,12 +115,12 @@ tq_convert: tools/tq_convert.c libturboquant.a
115115# Test (lightweight — no Google Test dependency)
116116# ============================================================
117117
118- test : tq_run
118+ test : quant
119119 @echo " === Quick sanity test ==="
120120 @echo " Building..."
121- @echo " Running tq_run --info on test..."
121+ @echo " Running quant --info on test..."
122122 @if [ -f model.tqm ]; then \
123- ./tq_run model.tqm --info && echo " PASS: model loads" || echo " FAIL" ; \
123+ ./quant model.tqm --info && echo " PASS: model loads" || echo " FAIL" ; \
124124 else \
125125 echo " SKIP: no model.tqm found (download a model first)" ; \
126126 fi
@@ -131,7 +131,7 @@ test: tq_run
131131# ============================================================
132132
133133clean :
134- rm -f $(OBJ_LIB ) $(OBJ_METAL ) libturboquant.a tq_run tq_convert
134+ rm -f $(OBJ_LIB ) $(OBJ_METAL ) libturboquant.a quant tq_convert
135135 rm -f src/** /* .o
136136
137137# ============================================================
@@ -142,8 +142,8 @@ help:
142142 @echo " TurboQuant.cpp Makefile"
143143 @echo " "
144144 @echo " Targets:"
145- @echo " make Build tq_run + tq_convert"
146- @echo " make tq_run Build inference tool only"
145+ @echo " make Build quant + tq_convert"
146+ @echo " make quant Build inference tool only"
147147 @echo " make clean Remove build artifacts"
148148 @echo " make test Quick sanity test"
149149 @echo " make help Show this help"
0 commit comments