diff options
author | Tristan Riehs <tristan.riehs@bordeaux-inp.fr> | 2024-06-17 03:14:20 +0900 |
---|---|---|
committer | Tristan Riehs <tristan.riehs@bordeaux-inp.fr> | 2024-06-17 03:14:20 +0900 |
commit | cad449dff9c50bddcce41df04c5b3be771d28d04 (patch) | |
tree | 843a10df33202e06be4aca3ad381e4de18f20137 /src/Makefile.am | |
parent | 2e5693e7cf1e3c408916a1af6d16dc6363b835fe (diff) |
Improve build system
Add support for toggling debug on and off and for using GNU Readline
or not.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 006ee7f..88d970c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,19 @@ bin_PROGRAMS = calculer -AM_CFLAGS = -Wall -Wextra -I../linenoise/ -calculer_SOURCES = calculer.c linenoise.c -BUILT_SOURCES: linenoise.c +AM_CFLAGS = -Wall -Wextra +AM_LDFLAGS = +calculer_SOURCES = calculer.c + +if DEBUG_COND +else +AM_CFLAGS += -DNDEBUG -Wno-unused-variable +endif +if USE_READLINE_COND +AM_LDFLAGS += -lreadline +else +calculer_SOURCES += linenoise.c +AM_CFLAGS += -I../linenoise/ +BUILT_SOURCES: linenoise.c linenoise.c: cp ../linenoise/linenoise.c . +endif |