aboutsummaryrefslogtreecommitdiff
path: root/make.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-18 10:45:18 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-18 10:45:18 +0100
commitbf7be7d8106b3c72005ae91ffd3318fc33b6591a (patch)
tree6059c54b6e9e209810252dd1120e2bfcd694f512 /make.c
parent3e8cb32143a60069a3ae46d8331fe17e3760cb6b (diff)
s/debug/dflag
Diffstat (limited to 'make.c')
-rw-r--r--make.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/make.c b/make.c
index 55216e6..e63eeb7 100644
--- a/make.c
+++ b/make.c
@@ -30,13 +30,12 @@
static char *mkoutpath(const char *);
-static bool Pflag;
+static bool dflag, Pflag;
int
main(int argc, char **argv)
{
int opt;
- bool debug = false;
cmd_t c = {0};
cbsinit(argc, argv);
@@ -45,7 +44,7 @@ main(int argc, char **argv)
while ((opt = getopt(argc, argv, "dP")) != -1) {
switch (opt) {
case 'd':
- debug = true;
+ dflag = true;
break;
case 'P':
Pflag = true;
@@ -79,7 +78,7 @@ main(int argc, char **argv)
struct strv cflags = {0};
env_or_default(&cc, "CC", CC);
- if (debug)
+ if (dflag)
env_or_default(&cflags, "CFLAGS", CFLAGS, CFLAGS_DEBUG);
else
env_or_default(&cflags, "CFLAGS", CFLAGS, CFLAGS_RELEASE);