[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
if vs. ifdef in Makefile.am
From: |
ljh |
Subject: |
if vs. ifdef in Makefile.am |
Date: |
Thu, 2 Mar 2023 02:50:56 +0800 |
Hi community,
I want to build debug or release with
```
$ make # NDEBUG=1
$ make NDEBUG=1
```
Can I have automake.am to define and convey something like this to the output
Makefile:
```
ifdef NDEBUG # if vs. ifdef
CPPFLAGS += -DNDEBUG
CFLAGS += -O3 # .cpp
else
CFLAGS += -g # .cpp
LDFLAGS += -fsanitize=address
endif
```
But it seems I can only write `if` but not `ifdef` in Makefile.am.
So I had to enable ndebug option in configure.ac. That's a lot more work.
Thanks
Re: if vs. ifdef in Makefile.am, Arsen Arsenović, 2023/03/01
Re: if vs. ifdef in Makefile.am, Bogdan, 2023/03/02