build: Fix .c and bc: rules - sbase - suckless unix tools
(HTM) git clone git://git.suckless.org/sbase
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit abce467a9d5f61d41957f435cec34f28d1c5e1dc
(DIR) parent 14796edb26a2cdfa29cb78b0f934d620d5fd11dd
(HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Sat, 22 Nov 2025 12:04:36 +0100
build: Fix .c and bc: rules
These rules were not adding the proper flags in every case
resulting in the lost of some important flags in some
cases.
Diffstat:
M Makefile | 4 ++--
M bc.y | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
@@ -219,10 +219,10 @@ $(OBJ) $(BIN): $(HDR)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
.c:
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LIB)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIB)
bc: bc.c
- $(CC) $(LDFLAGS) -o $@ bc.c $(LIB)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ bc.c $(LIB)
$(MAKEOBJ): make/make.h
(DIR) diff --git a/bc.y b/bc.y
@@ -1,5 +1,4 @@
%{
-#define _XOPEN_SOURCE
#include <unistd.h>
#include <ctype.h>