diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-27 17:20:31 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-27 17:20:31 +0200 |
| commit | a9cc2b9854e66f6a161ddf92c268897ee0435216 (patch) | |
| tree | f4e36140be44dd1ada5c8ec01b68da2a47c41242 | |
| parent | 989e933fc557cbc1e9e16e45033387816ee6075e (diff) | |
| download | nissy-core-a9cc2b9854e66f6a161ddf92c268897ee0435216.tar.gz nissy-core-a9cc2b9854e66f6a161ddf92c268897ee0435216.zip | |
Set up for compile-time options
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | config.mk | 1 |
2 files changed, 6 insertions, 3 deletions
| @@ -1,5 +1,7 @@ | |||
| 1 | # See LICENSE file for copyright and license details. | 1 | # See LICENSE file for copyright and license details. |
| 2 | 2 | ||
| 3 | include config.mk | ||
| 4 | |||
| 3 | CFLAGS = -std=c99 -pthread -pedantic -Wall -Wextra \ | 5 | CFLAGS = -std=c99 -pthread -pedantic -Wall -Wextra \ |
| 4 | -Wno-unused-parameter -O3 | 6 | -Wno-unused-parameter -O3 |
| 5 | DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra \ | 7 | DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra \ |
| @@ -8,13 +10,13 @@ DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra \ | |||
| 8 | 10 | ||
| 9 | CC = cc | 11 | CC = cc |
| 10 | 12 | ||
| 11 | all: solve | 13 | all: cube.o debugcube.o |
| 12 | 14 | ||
| 13 | cube.o: clean | 15 | cube.o: clean |
| 14 | ${CC} ${CFLAGS} -c -o cube.o src/*.c | 16 | ${CC} -D${CUBETYPE} ${CFLAGS} -c -o cube.o src/cube.c |
| 15 | 17 | ||
| 16 | debugcube.o: | 18 | debugcube.o: |
| 17 | ${CC} ${DBGFLAGS} -c -o debugcube.o src/*.c | 19 | ${CC} -D${CUBETYPE} ${DBGFLAGS} -c -o debugcube.o src/cube.c |
| 18 | 20 | ||
| 19 | clean: | 21 | clean: |
| 20 | rm -rf *.o | 22 | rm -rf *.o |
diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..f71c9a5 --- /dev/null +++ b/config.mk | |||
| @@ -0,0 +1 @@ | |||
| CUBETYPE = CUBE_$(TYPE) | |||
