aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-10-27 17:20:31 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-10-27 17:20:31 +0200
commita9cc2b9854e66f6a161ddf92c268897ee0435216 (patch)
treef4e36140be44dd1ada5c8ec01b68da2a47c41242
parent989e933fc557cbc1e9e16e45033387816ee6075e (diff)
downloadnissy-core-a9cc2b9854e66f6a161ddf92c268897ee0435216.tar.gz
nissy-core-a9cc2b9854e66f6a161ddf92c268897ee0435216.zip
Set up for compile-time options
Diffstat (limited to '')
-rw-r--r--Makefile8
-rw-r--r--config.mk1
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0a4dfed..7459910 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
1# See LICENSE file for copyright and license details. 1# See LICENSE file for copyright and license details.
2 2
3include config.mk
4
3CFLAGS = -std=c99 -pthread -pedantic -Wall -Wextra \ 5CFLAGS = -std=c99 -pthread -pedantic -Wall -Wextra \
4 -Wno-unused-parameter -O3 6 -Wno-unused-parameter -O3
5DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra \ 7DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra \
@@ -8,13 +10,13 @@ DBGFLAGS = -DDEBUG -std=c99 -pthread -pedantic -Wall -Wextra \
8 10
9CC = cc 11CC = cc
10 12
11all: solve 13all: cube.o debugcube.o
12 14
13cube.o: clean 15cube.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
16debugcube.o: 18debugcube.o:
17 ${CC} ${DBGFLAGS} -c -o debugcube.o src/*.c 19 ${CC} -D${CUBETYPE} ${DBGFLAGS} -c -o debugcube.o src/cube.c
18 20
19clean: 21clean:
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)

Generated with cgit - Back to sebastiano.tronto.net