DEBUG flags explanation in README

This commit is contained in:
2021-01-27 14:16:38 +01:00
parent 05dbc9d261
commit 38838f6e4f

View File

@@ -12,10 +12,28 @@ git clone https://git.bodiccea.tk/bruno/Le-Compte-est-Bon.git
## Build
To display mode debug information, you may first enable some DEBUG flags in the `Makefile`.
To display more debug information, you may first enable some DEBUG flags in the `Makefile`. I usually use the `-DDEBUG`, `-DDEBUG_MAIN`, and `-DDEBUG_MEM`, as below
```makefile
CFLAGS:=$(CFLAGS) -DDEBUG # general (signal handler, etc...)
CFLAGS:=$(CFLAGS) -DDEBUG_MAIN # general information in main
#CFLAGS:=$(CFLAGS) -DDEBUG_MAINSLEEP # sleep 1 sec within main loop (SIGINTR test)
#CFLAGS:=$(CFLAGS) -DDEBUG_MAINLOOP # main loop (do not use this!)
#CFLAGS:=$(CFLAGS) -DDEBUG_TIMER # timer
#CFLAGS:=$(CFLAGS) -DDEBUG_SIGNAL # signal
#CFLAGS:=$(CFLAGS) -DDEBUG_BEST # best control
#CFLAGS:=$(CFLAGS) -DDEBUG_TREE # tree
#CFLAGS:=$(CFLAGS) -DDEBUG_OPER # oper
#CFLAGS:=$(CFLAGS) -DDEBUG_STACK # stack
#CFLAGS:=$(CFLAGS) -DDEBUG_STACK2 # stack - more details
#CFLAGS:=$(CFLAGS) -DDEBUG_EVAL # eval
#CFLAGS:=$(CFLAGS) -DDEBUG_EVAL2 # eval 2
#CFLAGS:=$(CFLAGS) -DDEBUG_EVAL3 # eval 3
CFLAGS:=$(CFLAGS) -DDEBUG_MEM # malloc
```
To build the binaries just run:
``` shellsession
```console
$ make lceb
```
@@ -37,7 +55,7 @@ trees : 14
max evaluations : 537,600
Le compte est bon: 5 solutions with 2 ops (1st after 0.00030 secs).
1 8 7 - +
1 8 8 / +
1 8 8 / +g
1 7 7 / +
1 8 + 7 -
8 7 1 - -