Always generate tables for current (blocks,teeth) config
This commit is contained in:
@@ -53,6 +53,7 @@ int main(int argc, char **argv) {
|
|||||||
const char outfile[] = "src/precomputed_ecmult_gen.c";
|
const char outfile[] = "src/precomputed_ecmult_gen.c";
|
||||||
FILE* fp;
|
FILE* fp;
|
||||||
size_t config;
|
size_t config;
|
||||||
|
int did_current_config = 0;
|
||||||
|
|
||||||
(void)argc;
|
(void)argc;
|
||||||
(void)argv;
|
(void)argv;
|
||||||
@@ -77,6 +78,12 @@ int main(int argc, char **argv) {
|
|||||||
fprintf(fp, "#if 0\n");
|
fprintf(fp, "#if 0\n");
|
||||||
for (config = 0; config < sizeof(CONFIGS) / sizeof(*CONFIGS); ++config) {
|
for (config = 0; config < sizeof(CONFIGS) / sizeof(*CONFIGS); ++config) {
|
||||||
print_table(fp, CONFIGS[config][0], CONFIGS[config][1]);
|
print_table(fp, CONFIGS[config][0], CONFIGS[config][1]);
|
||||||
|
if (CONFIGS[config][0] == COMB_BLOCKS && CONFIGS[config][1] == COMB_TEETH) {
|
||||||
|
did_current_config = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!did_current_config) {
|
||||||
|
print_table(fp, COMB_BLOCKS, COMB_TEETH);
|
||||||
}
|
}
|
||||||
fprintf(fp, "#else\n");
|
fprintf(fp, "#else\n");
|
||||||
fprintf(fp, "# error Configuration mismatch, invalid COMB_* parameters. Try deleting precomputed_ecmult_gen.c before the build.\n");
|
fprintf(fp, "# error Configuration mismatch, invalid COMB_* parameters. Try deleting precomputed_ecmult_gen.c before the build.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user