mirror of
git://git.suckless.org/sbase
synced 2025-01-03 13:42:03 +00:00
build: Posixfy the Makefile
This commit is contained in:
parent
ddde8021b3
commit
090490b81d
12
Makefile
12
Makefile
@ -1,8 +1,16 @@
|
|||||||
|
.POSIX:
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .o .c
|
.SUFFIXES: .o .c
|
||||||
|
|
||||||
|
CPPFLAGS =\
|
||||||
|
-D_DEFAULT_SOURCE \
|
||||||
|
-D_NETBSD_SOURCE \
|
||||||
|
-D_BSD_SOURCE \
|
||||||
|
-D_XOPEN_SOURCE=700 \
|
||||||
|
-D_FILE_OFFSET_BITS=64
|
||||||
|
|
||||||
HDR =\
|
HDR =\
|
||||||
arg.h\
|
arg.h\
|
||||||
compat.h\
|
compat.h\
|
||||||
@ -189,13 +197,13 @@ all: $(BIN)
|
|||||||
|
|
||||||
$(BIN): $(LIB)
|
$(BIN): $(LIB)
|
||||||
|
|
||||||
$(OBJ): $(HDR) config.mk
|
$(OBJ): $(HDR)
|
||||||
|
|
||||||
.o:
|
.o:
|
||||||
$(CC) $(LDFLAGS) -o $@ $< $(LIB)
|
$(CC) $(LDFLAGS) -o $@ $< $(LIB)
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
libutf.a: $(LIBUTFOBJ)
|
libutf.a: $(LIBUTFOBJ)
|
||||||
$(AR) $(ARFLAGS) $@ $?
|
$(AR) $(ARFLAGS) $@ $?
|
||||||
|
11
config.mk
11
config.mk
@ -5,12 +5,11 @@ VERSION = 0.0
|
|||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
CC = cc
|
# tools
|
||||||
AR = ar
|
#CC =
|
||||||
|
#AR =
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
|
|
||||||
# for NetBSD add -D_NETBSD_SOURCE
|
|
||||||
# -lrt might be needed on some systems
|
# -lrt might be needed on some systems
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_FILE_OFFSET_BITS=64
|
# CFLAGS =
|
||||||
CFLAGS = -std=c99 -Wall -pedantic
|
# LDFLAGS =
|
||||||
LDFLAGS = -s
|
|
||||||
|
Loading…
Reference in New Issue
Block a user