sbase/Makefile

244 lines
3.4 KiB
Makefile
Raw Normal View History

2011-05-23 01:36:34 +00:00
include config.mk
.SUFFIXES:
.SUFFIXES: .o .c
HDR =\
arg.h\
2014-11-17 15:45:09 +00:00
compat.h\
crypt.h\
fs.h\
md5.h\
queue.h\
sha1.h\
sha224.h\
sha256.h\
sha384.h\
sha512.h\
sha512-224.h\
sha512-256.h\
text.h\
utf.h\
2014-11-13 18:20:51 +00:00
util.h
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
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
LIB = libutf.a libutil.a
BIN =\
basename\
cal\
cat\
chgrp\
chmod\
chown\
chroot\
cksum\
cmp\
cols\
comm\
cp\
2014-12-16 10:59:08 +00:00
cron\
cut\
date\
2020-04-29 05:22:37 +00:00
dd\
dirname\
du\
echo\
2015-12-14 12:09:34 +00:00
ed\
env\
expand\
expr\
false\
find\
flock\
fold\
getconf\
grep\
head\
hostname\
2016-10-20 16:06:18 +00:00
join\
kill\
link\
ln\
logger\
logname\
ls\
md5sum\
mkdir\
mkfifo\
mknod\
mktemp\
mv\
nice\
nl\
nohup\
od\
paste\
2016-10-20 16:06:18 +00:00
pathchk\
printenv\
printf\
pwd\
readlink\
renice\
rev\
rm\
rmdir\
sed\
2014-12-01 17:12:07 +00:00
seq\
setsid\
2014-12-01 17:12:07 +00:00
sha1sum\
sha224sum\
2014-12-01 17:12:07 +00:00
sha256sum\
sha384sum\
2014-12-01 17:12:07 +00:00
sha512sum\
sha512-224sum\
sha512-256sum\
2014-12-01 17:12:07 +00:00
sleep\
sort\
split\
sponge\
strings\
sync\
tail\
tar\
tee\
test\
tftp\
time\
touch\
tr\
true\
tsort\
tty\
uname\
unexpand\
uniq\
unlink\
2014-12-01 17:12:07 +00:00
uudecode\
uuencode\
wc\
2015-04-27 14:24:43 +00:00
which\
whoami\
xargs\
2016-02-15 08:44:35 +00:00
xinstall\
yes
OBJ = $(BIN:=.o) $(LIBUTFOBJ) $(LIBUTILOBJ)
2016-02-15 08:44:35 +00:00
MAN = $(BIN:=.1)
2011-05-23 01:36:34 +00:00
all: $(BIN)
$(BIN): $(LIB)
2011-05-23 01:36:34 +00:00
$(OBJ): $(HDR) config.mk
2011-05-23 01:36:34 +00:00
.o:
$(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
libutf.a: $(LIBUTFOBJ)
$(AR) $(ARFLAGS) $@ $?
2014-11-19 10:50:54 +00:00
$(RANLIB) $@
libutil.a: $(LIBUTILOBJ)
$(AR) $(ARFLAGS) $@ $?
2014-11-17 12:22:53 +00:00
$(RANLIB) $@
2011-05-23 01:36:34 +00:00
getconf.o: getconf.h
getconf.h:
scripts/getconf.sh > $@
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)
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
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:
rm -f $(BIN) $(OBJ) $(LIB) sbase-box sbase-$(VERSION).tar.gz
rm -f getconf.h
2023-09-26 21:09:34 +00:00
rm -f proto
rm -rf build
2014-11-17 13:02:17 +00:00
.PHONY: all install uninstall dist sbase-box-install sbase-box-uninstall clean