Introduction
Introduction Statistics Contact Development Disclaimer Help
build: Posixfy the Makefile - sbase - suckless unix tools
git clone git://git.suckless.org/sbase
Log
Files
Refs
README
LICENSE
---
commit 090490b81d01f4e1da005560669fbb1239c88989
parent ddde8021b371c7e519e8dfbca5c1f403af7099dd
Author: Roberto E. Vargas Caballero <[email protected]>
Date: Wed, 27 Sep 2023 09:46:39 +0200
build: Posixfy the Makefile
Diffstat:
M Makefile | 12 ++++++++++--
M config.mk | 11 +++++------
2 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -1,8 +1,16 @@
+.POSIX:
include config.mk
.SUFFIXES:
.SUFFIXES: .o .c
+CPPFLAGS =\
+ -D_DEFAULT_SOURCE \
+ -D_NETBSD_SOURCE \
+ -D_BSD_SOURCE \
+ -D_XOPEN_SOURCE=700 \
+ -D_FILE_OFFSET_BITS=64
+
HDR =\
arg.h\
compat.h\
@@ -189,13 +197,13 @@ all: $(BIN)
$(BIN): $(LIB)
-$(OBJ): $(HDR) config.mk
+$(OBJ): $(HDR)
.o:
$(CC) $(LDFLAGS) -o $@ $< $(LIB)
.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
libutf.a: $(LIBUTFOBJ)
$(AR) $(ARFLAGS) $@ $?
diff --git a/config.mk b/config.mk
@@ -5,12 +5,11 @@ VERSION = 0.0
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
-CC = cc
-AR = ar
+# tools
+#CC =
+#AR =
RANLIB = ranlib
-# for NetBSD add -D_NETBSD_SOURCE
# -lrt might be needed on some systems
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_FILE_OFFSET_…
-CFLAGS = -std=c99 -Wall -pedantic
-LDFLAGS = -s
+# CFLAGS =
+# LDFLAGS =
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.