aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/GNUmakefile
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2025-08-08 22:27:29 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2025-08-15 21:46:37 +0100
commit3f19ae7b18ae681fbd959e9099b70489053da874 (patch)
treea37a11e83643191cb1d56c056c87b75c08912fa5 /klippy/chelper/GNUmakefile
parentd7a6aa81ef4506b7d4e10ddf09ee1662e0eebbd0 (diff)
downloadkutter-3f19ae7b18ae681fbd959e9099b70489053da874.tar.gz
kutter-3f19ae7b18ae681fbd959e9099b70489053da874.tar.xz
kutter-3f19ae7b18ae681fbd959e9099b70489053da874.zip
Use makefiles instead of auto-building
Diffstat (limited to 'klippy/chelper/GNUmakefile')
-rw-r--r--klippy/chelper/GNUmakefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/klippy/chelper/GNUmakefile b/klippy/chelper/GNUmakefile
new file mode 100644
index 00000000..acad5b62
--- /dev/null
+++ b/klippy/chelper/GNUmakefile
@@ -0,0 +1,24 @@
+filter_cc_option = $(shell $(CC) $(1) -E -x c /dev/null -o /dev/null >/dev/null 2>&1 && printf %s $(1))
+
+objs := itersolve.o kin_cartesian.o kin_corexy.o kin_corexz.o kin_delta.o \
+ kin_deltesian.o kin_extruder.o kin_generic.o kin_idex.o kin_polar.o \
+ kin_rotary_delta.o kin_shaper.o kin_winch.o msgblock.o pollreactor.o \
+ pyhelper.o serialqueue.o stepcompress.o trapq.o trdispatch.o
+
+hub_ctrl := hub-ctrl
+hub_ctrl_objs := hub-ctrl.o
+
+sse_flags = $(call filter_cc_option -mfpmath=sse) $(call filter_cc_option -fno-use-linker-plugin)
+CFLAGS ?= -Wall -O2 -flto -fno-fat-lto-objects $(sse_flags)
+CFLAGS += -std=gnu17 -MMD -MP
+LDFLAGS ?= -flto
+
+
+c_helper.so: CFLAGS += -fPIC
+c_helper.so: LDFLAGS += -shared -fPIC
+c_helper.so: $(objs)
+ $(LINK.o) $^ $(LDLIBS) -o $@
+
+$(objs): GNUmakefile
+
+-include: $(objs:.o=.d)