Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/mk/gen-protocol.mk # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / mk / gen-protocol.mk` 61 lines ยท 3178 bytes Raw Blame History 1 # GEN-1: pre-registered generalization protocol tools (aien-spark/omega#476, docs/one_layer/GEN_PROTOCOL_V1.md). 2 # Picked up by `-include mk/*.mk`; not part of `all` or `test`. CPU only. 3 # 4 # gen-protocol-tools build/gen_protocol/{famsig,gencheck,genstats,genjac} 5 # (the C build of record while protocol.json pins the C sources) 6 # gen-protocol-om-tools build/gen_protocol/{famsig,gencheck,genstats,genjac}_om: the pure OM-2 ports, built by 7 # the seeded omc (GENP_OMC, default seed/out/omc) 8 # test-gen-protocol genstats selftest, genjac known answers + byte-identical stats_vectors.tsv, famsig known answers and mutants, 9 # gencheck on tests/one_layer/generalization/protocol.json and its mutants (manifest, 10 # tree, synthetic held-out split), dev pack reproducibility + oracle negative control. 11 # GEN_TASKS_CHECK=1 also runs ola.sh tasks-check on the dev pack (clean tree needed). 12 # With GENP_OMC (passed by default) every suite invocation also runs the OM-2 port and 13 # must be byte-identical to the C build (stdout, stderr, exit status). 14 ifndef GEN_PROTOCOL_MK 15 GEN_PROTOCOL_MK := 1 16 .PHONY: gen-protocol-tools gen-protocol-om-tools test-gen-protocol 17 GENP_SRC = tools/gen/protocol 18 GENP_DIR = $(OUT_DIR)/gen_protocol 19 GENP_CFLAGS = -std=gnu11 -Wall -Wextra -Werror -O2 -Isrc 20 GENP_OMC ?= seed/out/omc 21 GENP_FSLIB = seed/ng/sha256.om $(GENP_SRC)/famsig_lib.om 22 23 $(GENP_DIR)/famsig: $(GENP_SRC)/famsig.c $(GENP_SRC)/famsig_lib.h src/omega_om_units.c src/sha256.h 24 @mkdir -p $(GENP_DIR) 25 $(CC) $(GENP_CFLAGS) -o $@ $(GENP_SRC)/famsig.c src/omega_om_units.c 26 27 $(GENP_DIR)/gencheck: $(GENP_SRC)/gencheck.c $(GENP_SRC)/famsig_lib.h src/omega_om_units.c src/sha256.h 28 @mkdir -p $(GENP_DIR) 29 $(CC) $(GENP_CFLAGS) -o $@ $(GENP_SRC)/gencheck.c src/omega_om_units.c 30 31 $(GENP_DIR)/genstats: $(GENP_SRC)/genstats.c 32 @mkdir -p $(GENP_DIR) 33 $(CC) $(GENP_CFLAGS) -o $@ $(GENP_SRC)/genstats.c -lm 34 35 $(GENP_DIR)/genjac: $(GENP_SRC)/genjac.c 36 @mkdir -p $(GENP_DIR) 37 $(CC) $(GENP_CFLAGS) -o $@ $(GENP_SRC)/genjac.c 38 39 gen-protocol-tools: $(GENP_DIR)/famsig $(GENP_DIR)/gencheck $(GENP_DIR)/genstats $(GENP_DIR)/genjac 40 41 $(GENP_DIR)/famsig_om: $(GENP_FSLIB) $(GENP_SRC)/famsig.om $(GENP_OMC) 42 @mkdir -p $(GENP_DIR) 43 (printf 'om2\n'; sed '/^om2$$/d' $(GENP_FSLIB) $(GENP_SRC)/famsig.om) | $(GENP_OMC) > $@ && chmod +x $@ 44 45 $(GENP_DIR)/gencheck_om: $(GENP_FSLIB) $(GENP_SRC)/gencheck.om $(GENP_OMC) 46 @mkdir -p $(GENP_DIR) 47 (printf 'om2\n'; sed '/^om2$$/d' $(GENP_FSLIB) $(GENP_SRC)/gencheck.om) | $(GENP_OMC) > $@ && chmod +x $@ 48 49 $(GENP_DIR)/genstats_om: $(GENP_SRC)/genstats.om $(GENP_OMC) 50 @mkdir -p $(GENP_DIR) 51 $(GENP_OMC) < $(GENP_SRC)/genstats.om > $@ && chmod +x $@ 52 53 $(GENP_DIR)/genjac_om: $(GENP_SRC)/genjac.om $(GENP_OMC) 54 @mkdir -p $(GENP_DIR) 55 $(GENP_OMC) < $(GENP_SRC)/genjac.om > $@ && chmod +x $@ 56 57 gen-protocol-om-tools: $(GENP_DIR)/famsig_om $(GENP_DIR)/gencheck_om $(GENP_DIR)/genstats_om $(GENP_DIR)/genjac_om 58 59 test-gen-protocol: 60 CC="$(CC)" GENP_OMC="$(abspath $(GENP_OMC))" bash $(GENP_SRC)/test_gen_protocol.sh $(abspath $(GENP_DIR))/test 61 endif