Initial commit: Klammertext source distribution
Curated source subset assembled by klammertext-dev's doc/make_dist.sh: the Klammermachine (mac), the Standard Klammer Set (sks), the commands (com), editor plugins and install guides (doc), a test subset (tst), and lib/bin placeholders. Builds with 'make -C com'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
53
sks/Makefile
Normal file
53
sks/Makefile
Normal file
@@ -0,0 +1,53 @@
|
||||
# Klammertext sks/ Makefile
|
||||
# Builds all .so files in sks/ subdirectories
|
||||
|
||||
K := $(KLAMMERTEXT_HOME)
|
||||
KS := $(K)/sks
|
||||
KM := $(K)/mac
|
||||
|
||||
# Shared library that all .so files depend on
|
||||
LIBRARY := $(K)/lib/libklammertext.so
|
||||
|
||||
# Support directories (build .o files used by other sks/ components)
|
||||
SUPPORT_DIRS := kutil target
|
||||
|
||||
# Excluded directories:
|
||||
# kutil, target - support directories that build .o files, not .so
|
||||
# book, phase - obsolete, not updated for libklammertext.so
|
||||
|
||||
# Directories that build .so files (excluding support and obsolete directories)
|
||||
# Find all subdirectories with Makefiles that have .so build targets
|
||||
# (look for lines like "xyz.so :" or "all : xyz.so")
|
||||
SO_DIRS := $(shell for dir in $(KS)/*/; do \
|
||||
if [ -f "$${dir}Makefile" ] && grep -qE '^[a-z]+\.so\s*:|all\s*:.*\.so' "$${dir}Makefile" 2>/dev/null; then \
|
||||
basename "$$dir"; \
|
||||
fi; done | grep -v -E '^(kutil|target|book|phase)$$')
|
||||
|
||||
.PHONY: all clean support $(SUPPORT_DIRS) $(SO_DIRS)
|
||||
|
||||
# Default target: build support first, then all .so files
|
||||
all : support $(SO_DIRS)
|
||||
|
||||
# Build support directories
|
||||
support : $(SUPPORT_DIRS)
|
||||
|
||||
kutil :
|
||||
$(MAKE) -j -C $(KS)/kutil
|
||||
|
||||
target : kutil
|
||||
$(MAKE) -j -C $(KS)/target
|
||||
|
||||
# Pattern rule for .so directories
|
||||
# Each depends on the library and support directories
|
||||
$(SO_DIRS) : support $(LIBRARY)
|
||||
$(MAKE) -j -C $(KS)/$@
|
||||
|
||||
# Clean all subdirectories
|
||||
clean :
|
||||
@for dir in $(SUPPORT_DIRS) $(SO_DIRS); do \
|
||||
echo "Cleaning $$dir..."; \
|
||||
$(MAKE) -C $(KS)/$$dir clean; \
|
||||
done
|
||||
|
||||
# Rebuild everything
|
||||
redo : clean all
|
||||
Reference in New Issue
Block a user