diff options
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a2817d3..7094734 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,6 @@ bin_PROGRAMS = calculer AM_CFLAGS = -Wall -Wextra +calculer_CFLAGS = $(AM_CFLAGS) AM_LDFLAGS = calculer_SOURCES = calculer.c disp.c @@ -7,16 +8,32 @@ if DEBUG_COND noinst_LTLIBRARIES = ray.la ray_la_SOURCES = ray.c ray_la_LDFLAGS = -module -rpath @abs_srcdir@ -lraylib -else + +noinst_LTLIBRARIES += cli.la +cli_la_SOURCES = cli.c +cli_la_LDFLAGS = -module -rpath @abs_srcdir@ + +if USE_READLINE_COND +cli_la_LDFLAGS += -lreadline +else # USE_READLINE_COND +EXTRA_cli_la_SOURCES = linenoise.c +cli_la_AM_CFLAGS = -I../linenoise/ +BUILT_SOURCES: linenoise_lib.c +linenoise_lib.c: + cp ../linenoise/linenoise.c ./$@ +endif # USE_READLINE_COND + +else # DEBUG_COND AM_CFLAGS += -DNDEBUG -Wno-unused-variable -endif if USE_READLINE_COND AM_LDFLAGS += -lreadline -else +else # USE_READLINE_COND calculer_SOURCES += linenoise.c AM_CFLAGS += -I../linenoise/ BUILT_SOURCES: linenoise.c linenoise.c: - cp ../linenoise/linenoise.c . -endif + cp ../linenoise/linenoise.c ./$@ +endif # USE_READLINE_COND + +endif # DEBUG_COND |