2011-05-23 01:36:34 +00:00
|
|
|
include config.mk
|
|
|
|
|
2014-11-18 20:12:14 +00:00
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .o .c
|
2012-05-16 12:14:02 +00:00
|
|
|
|
2014-11-17 13:22:10 +00:00
|
|
|
HDR =\
|
|
|
|
arg.h\
|
2014-11-17 15:45:09 +00:00
|
|
|
compat.h\
|
2014-11-17 13:22:10 +00:00
|
|
|
crypt.h\
|
|
|
|
fs.h\
|
|
|
|
md5.h\
|
|
|
|
queue.h\
|
|
|
|
sha1.h\
|
2016-02-24 09:05:31 +00:00
|
|
|
sha224.h\
|
2014-11-17 13:22:10 +00:00
|
|
|
sha256.h\
|
2016-02-24 09:05:31 +00:00
|
|
|
sha384.h\
|
2014-11-17 13:22:10 +00:00
|
|
|
sha512.h\
|
2016-02-24 10:36:59 +00:00
|
|
|
sha512-224.h\
|
|
|
|
sha512-256.h\
|
2014-11-17 13:22:10 +00:00
|
|
|
text.h\
|
2014-11-17 15:41:44 +00:00
|
|
|
utf.h\
|
2014-11-13 18:20:51 +00:00
|
|
|
util.h
|
|
|
|
|
2023-09-26 17:36:55 +00:00
|
|
|
LIBUTFOBJ =\
|
|
|
|
libutf/fgetrune.o\
|
|
|
|
libutf/fputrune.o\
|
|
|
|
libutf/isalnumrune.o\
|
|
|
|
libutf/isalpharune.o\
|
|
|
|
libutf/isblankrune.o\
|
|
|
|
libutf/iscntrlrune.o\
|
|
|
|
libutf/isdigitrune.o\
|
|
|
|
libutf/isgraphrune.o\
|
|
|
|
libutf/isprintrune.o\
|
|
|
|
libutf/ispunctrune.o\
|
|
|
|
libutf/isspacerune.o\
|
|
|
|
libutf/istitlerune.o\
|
|
|
|
libutf/isxdigitrune.o\
|
|
|
|
libutf/lowerrune.o\
|
|
|
|
libutf/rune.o\
|
|
|
|
libutf/runetype.o\
|
|
|
|
libutf/upperrune.o\
|
|
|
|
libutf/utf.o\
|
|
|
|
libutf/utftorunestr.o
|
2014-11-17 15:41:44 +00:00
|
|
|
|
2023-09-26 17:36:55 +00:00
|
|
|
LIBUTILOBJ =\
|
|
|
|
libutil/concat.o\
|
|
|
|
libutil/cp.o\
|
|
|
|
libutil/crypt.o\
|
|
|
|
libutil/ealloc.o\
|
|
|
|
libutil/enmasse.o\
|
|
|
|
libutil/eprintf.o\
|
|
|
|
libutil/eregcomp.o\
|
|
|
|
libutil/estrtod.o\
|
|
|
|
libutil/fnck.o\
|
|
|
|
libutil/fshut.o\
|
|
|
|
libutil/getlines.o\
|
|
|
|
libutil/human.o\
|
|
|
|
libutil/linecmp.o\
|
|
|
|
libutil/md5.o\
|
|
|
|
libutil/memmem.o\
|
|
|
|
libutil/mkdirp.o\
|
|
|
|
libutil/mode.o\
|
|
|
|
libutil/parseoffset.o\
|
|
|
|
libutil/putword.o\
|
|
|
|
libutil/reallocarray.o\
|
|
|
|
libutil/recurse.o\
|
|
|
|
libutil/rm.o\
|
|
|
|
libutil/sha1.o\
|
|
|
|
libutil/sha224.o\
|
|
|
|
libutil/sha256.o\
|
|
|
|
libutil/sha384.o\
|
|
|
|
libutil/sha512.o\
|
|
|
|
libutil/sha512-224.o\
|
|
|
|
libutil/sha512-256.o\
|
|
|
|
libutil/strcasestr.o\
|
|
|
|
libutil/strlcat.o\
|
|
|
|
libutil/strlcpy.o\
|
|
|
|
libutil/strsep.o\
|
|
|
|
libutil/strnsubst.o\
|
|
|
|
libutil/strtonum.o\
|
|
|
|
libutil/unescape.o\
|
|
|
|
libutil/writeall.o
|
2014-11-17 12:12:10 +00:00
|
|
|
|
2023-09-27 04:47:37 +00:00
|
|
|
LIB = libutf.a libutil.a
|
2014-11-17 15:41:44 +00:00
|
|
|
|
2014-11-17 13:22:10 +00:00
|
|
|
BIN =\
|
|
|
|
basename\
|
|
|
|
cal\
|
|
|
|
cat\
|
|
|
|
chgrp\
|
|
|
|
chmod\
|
|
|
|
chown\
|
|
|
|
chroot\
|
|
|
|
cksum\
|
|
|
|
cmp\
|
|
|
|
cols\
|
|
|
|
comm\
|
|
|
|
cp\
|
2014-12-16 10:59:08 +00:00
|
|
|
cron\
|
2014-11-17 13:22:10 +00:00
|
|
|
cut\
|
|
|
|
date\
|
2020-04-29 05:22:37 +00:00
|
|
|
dd\
|
2014-11-17 13:22:10 +00:00
|
|
|
dirname\
|
|
|
|
du\
|
|
|
|
echo\
|
2015-12-14 12:09:34 +00:00
|
|
|
ed\
|
2014-11-17 13:22:10 +00:00
|
|
|
env\
|
|
|
|
expand\
|
|
|
|
expr\
|
|
|
|
false\
|
2015-02-20 01:47:21 +00:00
|
|
|
find\
|
2015-10-07 09:16:18 +00:00
|
|
|
flock\
|
2014-11-17 13:22:10 +00:00
|
|
|
fold\
|
2015-09-30 22:59:40 +00:00
|
|
|
getconf\
|
2014-11-17 13:22:10 +00:00
|
|
|
grep\
|
|
|
|
head\
|
|
|
|
hostname\
|
2016-10-20 16:06:18 +00:00
|
|
|
join\
|
2014-11-17 13:22:10 +00:00
|
|
|
kill\
|
|
|
|
link\
|
|
|
|
ln\
|
2014-12-04 11:34:39 +00:00
|
|
|
logger\
|
2014-11-17 13:22:10 +00:00
|
|
|
logname\
|
|
|
|
ls\
|
|
|
|
md5sum\
|
|
|
|
mkdir\
|
|
|
|
mkfifo\
|
2020-03-01 23:58:37 +00:00
|
|
|
mknod\
|
2014-11-17 13:22:10 +00:00
|
|
|
mktemp\
|
|
|
|
mv\
|
|
|
|
nice\
|
|
|
|
nl\
|
|
|
|
nohup\
|
2015-09-29 01:02:17 +00:00
|
|
|
od\
|
2014-11-17 13:22:10 +00:00
|
|
|
paste\
|
2016-10-20 16:06:18 +00:00
|
|
|
pathchk\
|
2014-11-17 13:22:10 +00:00
|
|
|
printenv\
|
|
|
|
printf\
|
|
|
|
pwd\
|
|
|
|
readlink\
|
|
|
|
renice\
|
2016-03-26 16:23:03 +00:00
|
|
|
rev\
|
2014-11-17 13:22:10 +00:00
|
|
|
rm\
|
|
|
|
rmdir\
|
2015-02-10 10:34:46 +00:00
|
|
|
sed\
|
2014-12-01 17:12:07 +00:00
|
|
|
seq\
|
2014-11-17 13:22:10 +00:00
|
|
|
setsid\
|
2014-12-01 17:12:07 +00:00
|
|
|
sha1sum\
|
2016-02-24 09:05:31 +00:00
|
|
|
sha224sum\
|
2014-12-01 17:12:07 +00:00
|
|
|
sha256sum\
|
2016-02-24 09:05:31 +00:00
|
|
|
sha384sum\
|
2014-12-01 17:12:07 +00:00
|
|
|
sha512sum\
|
2016-02-24 10:36:59 +00:00
|
|
|
sha512-224sum\
|
|
|
|
sha512-256sum\
|
2014-12-01 17:12:07 +00:00
|
|
|
sleep\
|
2014-11-17 13:22:10 +00:00
|
|
|
sort\
|
|
|
|
split\
|
|
|
|
sponge\
|
|
|
|
strings\
|
|
|
|
sync\
|
|
|
|
tail\
|
|
|
|
tar\
|
|
|
|
tee\
|
|
|
|
test\
|
2015-08-14 11:58:02 +00:00
|
|
|
tftp\
|
2015-02-27 21:31:04 +00:00
|
|
|
time\
|
2014-11-17 13:22:10 +00:00
|
|
|
touch\
|
|
|
|
tr\
|
|
|
|
true\
|
2016-02-17 00:17:33 +00:00
|
|
|
tsort\
|
2014-11-17 13:22:10 +00:00
|
|
|
tty\
|
|
|
|
uname\
|
|
|
|
unexpand\
|
|
|
|
uniq\
|
|
|
|
unlink\
|
2014-12-01 17:12:07 +00:00
|
|
|
uudecode\
|
|
|
|
uuencode\
|
2014-11-17 13:22:10 +00:00
|
|
|
wc\
|
2015-04-27 14:24:43 +00:00
|
|
|
which\
|
2015-12-14 09:55:25 +00:00
|
|
|
whoami\
|
2014-11-17 13:22:10 +00:00
|
|
|
xargs\
|
2016-02-15 08:44:35 +00:00
|
|
|
xinstall\
|
2014-11-17 12:12:10 +00:00
|
|
|
yes
|
|
|
|
|
2014-11-17 15:41:44 +00:00
|
|
|
OBJ = $(BIN:=.o) $(LIBUTFOBJ) $(LIBUTILOBJ)
|
2016-02-15 08:44:35 +00:00
|
|
|
MAN = $(BIN:=.1)
|
2011-05-23 01:36:34 +00:00
|
|
|
|
2014-11-17 13:50:19 +00:00
|
|
|
all: $(BIN)
|
2013-07-18 19:28:08 +00:00
|
|
|
|
2023-09-26 18:51:30 +00:00
|
|
|
$(BIN): $(LIB)
|
2011-05-23 01:36:34 +00:00
|
|
|
|
2014-11-13 18:26:38 +00:00
|
|
|
$(OBJ): $(HDR) config.mk
|
2011-05-23 01:36:34 +00:00
|
|
|
|
|
|
|
.o:
|
2015-07-31 22:09:40 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $< $(LIB)
|
2011-05-23 01:36:34 +00:00
|
|
|
|
|
|
|
.c.o:
|
2014-11-17 10:31:29 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
2011-05-24 12:00:30 +00:00
|
|
|
|
2023-09-27 04:47:37 +00:00
|
|
|
libutf.a: $(LIBUTFOBJ)
|
2023-09-27 05:24:14 +00:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
2014-11-19 10:50:54 +00:00
|
|
|
$(RANLIB) $@
|
|
|
|
|
2023-09-27 04:47:37 +00:00
|
|
|
libutil.a: $(LIBUTILOBJ)
|
2023-09-27 05:24:14 +00:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
2014-11-17 12:22:53 +00:00
|
|
|
$(RANLIB) $@
|
2011-05-23 01:36:34 +00:00
|
|
|
|
2016-10-03 22:55:22 +00:00
|
|
|
getconf.o: getconf.h
|
2015-12-14 20:22:43 +00:00
|
|
|
|
2023-09-26 18:03:53 +00:00
|
|
|
getconf.h:
|
|
|
|
scripts/getconf.sh > $@
|
2015-12-14 20:22:43 +00:00
|
|
|
|
2023-09-26 21:09:34 +00:00
|
|
|
install uninstall:
|
|
|
|
scripts/mkproto $@ $(DESTDIR)$(PREFIX) $(DESTDIR)$(MANPREFIX) proto
|
|
|
|
scripts/$@ proto
|
|
|
|
|
|
|
|
sbase-box-install: sbase-box
|
|
|
|
scripts/mkproto $@ $(DESTDIR)$(PREFIX) $(DESTDIR)$(MANPREFIX) proto
|
|
|
|
scripts/$@ proto
|
|
|
|
$(DESTDIR)$(PREFIX)/bin/sbase-box -i $(DESTDIR)$(PREFIX)/bin/
|
|
|
|
|
|
|
|
sbase-box-uninstall: sbase-box
|
|
|
|
$(DESTDIR)$(PREFIX)/bin/sbase-box -d $(DESTDIR)$(PREFIX)/bin/
|
|
|
|
$(MAKE) uninstall
|
2011-06-08 10:37:00 +00:00
|
|
|
|
2011-05-23 01:36:34 +00:00
|
|
|
dist: clean
|
2014-11-17 10:15:44 +00:00
|
|
|
mkdir -p sbase-$(VERSION)
|
2023-09-26 17:45:46 +00:00
|
|
|
cp -r LICENSE Makefile README TODO config.mk *.c *.1 *.h libutf libutil sbase-$(VERSION)
|
2014-11-17 10:15:44 +00:00
|
|
|
tar -cf sbase-$(VERSION).tar sbase-$(VERSION)
|
|
|
|
gzip sbase-$(VERSION).tar
|
|
|
|
rm -rf sbase-$(VERSION)
|
2011-05-23 01:36:34 +00:00
|
|
|
|
2023-09-26 17:26:47 +00:00
|
|
|
sbase-box: $(BIN)
|
|
|
|
scripts/mkbox
|
2015-09-03 18:07:16 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ build/*.c $(LIB)
|
2011-06-16 00:53:33 +00:00
|
|
|
|
2011-05-23 01:36:34 +00:00
|
|
|
clean:
|
2014-11-30 11:57:04 +00:00
|
|
|
rm -f $(BIN) $(OBJ) $(LIB) sbase-box sbase-$(VERSION).tar.gz
|
2016-10-03 22:55:22 +00:00
|
|
|
rm -f getconf.h
|
2023-09-26 21:09:34 +00:00
|
|
|
rm -f proto
|
2023-09-26 17:26:47 +00:00
|
|
|
rm -rf build
|
2014-11-17 13:02:17 +00:00
|
|
|
|
2023-09-27 04:35:21 +00:00
|
|
|
.PHONY: all install uninstall dist sbase-box-install sbase-box-uninstall clean
|