Add a config option to link against system or shipped strlcpy
This commit is contained in:
parent
e32415744c
commit
51cb204eb2
4
Makefile
4
Makefile
@ -3,7 +3,7 @@
|
||||
|
||||
include config.mk
|
||||
|
||||
SRC = ii.c strlcpy.c
|
||||
SRC = ii.c
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
IICFLAGS = -DVERSION=\"$(VERSION)\" -D_DEFAULT_SOURCE $(CFLAGS)
|
||||
@ -19,7 +19,7 @@ options:
|
||||
.c.o:
|
||||
$(CC) $(IICFLAGS) -c $<
|
||||
|
||||
ii: $(OBJ)
|
||||
ii: $(OBJ) $(LIBS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
||||
|
||||
$(OBJ): arg.h
|
||||
|
@ -6,6 +6,9 @@ PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
DOCPREFIX = ${PREFIX}/share/doc
|
||||
|
||||
CFLAGS = -Os
|
||||
# on systems which provide strlcpy(3),
|
||||
# remove NEED_STRLCPY from CFLAGS and
|
||||
# remove strlcpy.o from LIBS
|
||||
CFLAGS = -DNEED_STRLCPY -Os
|
||||
LDFLAGS = -s
|
||||
LIBS =
|
||||
LIBS = strlcpy.o
|
||||
|
Loading…
Reference in New Issue
Block a user