2013-03-19 18:28:32 -04:00
|
|
|
SOFTWARE_MEANT_FOR_SORTIX=1
|
2014-06-28 10:10:20 -04:00
|
|
|
include ../build-aux/platform.mak
|
|
|
|
include ../build-aux/compiler.mak
|
|
|
|
include ../build-aux/version.mak
|
|
|
|
include ../build-aux/dirs.mak
|
2011-08-27 17:03:39 -04:00
|
|
|
|
2014-04-13 16:34:36 -04:00
|
|
|
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
|
2016-02-28 18:40:20 -05:00
|
|
|
CFLAGS?=$(OPTLEVEL)
|
2012-09-10 17:36:15 -04:00
|
|
|
|
2016-02-28 18:40:20 -05:00
|
|
|
CFLAGS:=$(CFLAGS) -Wall -Wextra
|
2013-03-19 18:28:32 -04:00
|
|
|
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
|
2012-09-10 17:36:15 -04:00
|
|
|
|
2014-06-27 16:46:50 -04:00
|
|
|
BINARIES_EXCEPT_INSTALL:=\
|
2014-03-08 10:42:27 -05:00
|
|
|
basename \
|
2011-08-27 17:03:39 -04:00
|
|
|
cat \
|
2014-05-05 18:16:17 -04:00
|
|
|
chkblayout \
|
2013-06-18 07:40:12 -04:00
|
|
|
chmod \
|
2020-09-28 16:42:34 -04:00
|
|
|
chown \
|
2013-02-23 11:42:23 -05:00
|
|
|
chvideomode \
|
|
|
|
clear \
|
2013-03-16 17:41:48 -04:00
|
|
|
colormake \
|
2013-02-23 11:42:23 -05:00
|
|
|
column \
|
2013-06-09 07:44:34 -04:00
|
|
|
command-not-found \
|
2011-11-21 08:57:02 -05:00
|
|
|
cp \
|
2013-05-15 14:29:49 -04:00
|
|
|
date \
|
2015-05-31 14:39:04 -04:00
|
|
|
df \
|
2014-03-08 10:42:27 -05:00
|
|
|
dirname \
|
2013-10-17 14:55:54 -04:00
|
|
|
du \
|
2011-11-25 18:54:17 -05:00
|
|
|
echo \
|
2014-02-28 16:46:58 -05:00
|
|
|
env \
|
2014-03-06 18:07:11 -05:00
|
|
|
expr \
|
2013-11-11 09:07:56 -05:00
|
|
|
false \
|
2013-02-17 08:23:04 -05:00
|
|
|
find \
|
2013-02-23 11:42:23 -05:00
|
|
|
head \
|
2011-08-27 17:26:11 -04:00
|
|
|
help \
|
2015-06-26 21:12:26 -04:00
|
|
|
id \
|
2012-03-07 12:20:40 -05:00
|
|
|
kernelinfo \
|
2011-09-15 16:38:40 -04:00
|
|
|
kill \
|
2013-02-23 11:42:23 -05:00
|
|
|
ln \
|
2016-10-16 12:27:35 -04:00
|
|
|
logname \
|
2013-02-23 11:42:23 -05:00
|
|
|
ls \
|
|
|
|
memstat \
|
|
|
|
mkdir \
|
2015-05-31 17:11:41 -04:00
|
|
|
mktemp \
|
2013-02-16 10:28:40 -05:00
|
|
|
mv \
|
2021-03-13 14:19:10 -05:00
|
|
|
nl \
|
2011-12-26 11:15:14 -05:00
|
|
|
pager \
|
2015-11-25 13:18:14 -05:00
|
|
|
passwd \
|
2015-07-30 19:21:30 -04:00
|
|
|
ps \
|
2015-07-31 11:44:55 -04:00
|
|
|
pstree \
|
2013-02-23 11:42:23 -05:00
|
|
|
pwd \
|
2016-09-29 21:10:58 -04:00
|
|
|
readlink \
|
2015-02-16 08:18:38 -05:00
|
|
|
realpath \
|
2013-02-23 11:42:23 -05:00
|
|
|
rm \
|
|
|
|
rmdir \
|
2014-05-30 21:59:20 -04:00
|
|
|
sleep \
|
2014-03-07 20:02:02 -05:00
|
|
|
sort \
|
2015-08-01 07:55:44 -04:00
|
|
|
stat \
|
2020-11-25 14:47:19 -05:00
|
|
|
stty \
|
2012-03-02 18:29:24 -05:00
|
|
|
tail \
|
2016-09-25 21:07:27 -04:00
|
|
|
tee \
|
2013-05-14 19:51:09 -04:00
|
|
|
time \
|
2016-02-24 11:14:34 -05:00
|
|
|
touch \
|
2014-03-09 10:31:13 -04:00
|
|
|
tr \
|
2013-11-11 09:07:56 -05:00
|
|
|
true \
|
2016-11-19 11:35:43 -05:00
|
|
|
tty \
|
2013-11-11 09:07:56 -05:00
|
|
|
type \
|
2013-02-23 11:42:23 -05:00
|
|
|
uname \
|
2014-03-07 23:41:35 -05:00
|
|
|
uniq \
|
2013-02-23 11:42:23 -05:00
|
|
|
uptime \
|
2013-10-16 16:57:54 -04:00
|
|
|
wc \
|
2012-12-09 13:10:59 -05:00
|
|
|
which \
|
2014-11-30 10:49:39 -05:00
|
|
|
yes \
|
2011-08-27 17:03:39 -04:00
|
|
|
|
2014-06-27 16:46:50 -04:00
|
|
|
BINARIES=\
|
|
|
|
$(BINARIES_EXCEPT_INSTALL) \
|
|
|
|
xinstall
|
|
|
|
|
2016-10-09 12:56:52 -04:00
|
|
|
MANPAGES1=\
|
2016-09-29 08:33:00 -04:00
|
|
|
chkblayout.1 \
|
2017-02-13 13:47:33 -05:00
|
|
|
chvideomode.1 \
|
2016-10-01 09:47:19 -04:00
|
|
|
kernelinfo.1 \
|
2016-10-16 12:27:35 -04:00
|
|
|
logname.1 \
|
2016-10-06 00:54:29 -04:00
|
|
|
memstat.1 \
|
2016-10-04 02:27:04 -04:00
|
|
|
pager.1 \
|
2016-10-02 09:39:29 -04:00
|
|
|
passwd.1 \
|
2016-09-29 08:33:00 -04:00
|
|
|
readlink.1 \
|
2018-04-07 19:43:27 -04:00
|
|
|
sort.1 \
|
2017-02-05 14:41:07 -05:00
|
|
|
uname.1 \
|
2016-09-29 21:10:58 -04:00
|
|
|
|
2016-10-09 12:56:52 -04:00
|
|
|
SBINS=\
|
|
|
|
chroot \
|
|
|
|
unmount \
|
|
|
|
|
|
|
|
MANPAGES8=\
|
2016-10-12 08:05:40 -04:00
|
|
|
chroot.8 \
|
2016-10-11 03:38:50 -04:00
|
|
|
unmount.8 \
|
2016-10-09 12:56:52 -04:00
|
|
|
|
|
|
|
all: $(BINARIES) $(SBINS)
|
2012-09-10 17:36:15 -04:00
|
|
|
|
2014-04-22 09:26:55 -04:00
|
|
|
.PHONY: all install clean
|
2011-08-28 06:33:46 -04:00
|
|
|
|
2012-09-10 17:36:15 -04:00
|
|
|
install: all
|
2013-03-19 18:28:32 -04:00
|
|
|
mkdir -p $(DESTDIR)$(BINDIR)
|
2014-06-27 16:46:50 -04:00
|
|
|
install $(BINARIES_EXCEPT_INSTALL) $(DESTDIR)$(BINDIR)
|
|
|
|
install xinstall $(DESTDIR)$(BINDIR)/install
|
2016-10-09 12:56:52 -04:00
|
|
|
mkdir -p $(DESTDIR)$(SBINDIR)
|
|
|
|
install $(SBINS) $(DESTDIR)$(SBINDIR)
|
2016-09-29 21:10:58 -04:00
|
|
|
mkdir -p $(DESTDIR)$(MANDIR)/man1
|
2016-10-09 12:56:52 -04:00
|
|
|
cp $(MANPAGES1) $(DESTDIR)$(MANDIR)/man1
|
2016-10-11 03:38:50 -04:00
|
|
|
mkdir -p $(DESTDIR)$(MANDIR)/man8
|
|
|
|
cp $(MANPAGES8) $(DESTDIR)$(MANDIR)/man8
|
2011-08-28 06:33:46 -04:00
|
|
|
|
2021-07-27 15:11:50 -04:00
|
|
|
head: tail.c
|
|
|
|
|
|
|
|
xinstall: cp.c
|
|
|
|
|
2016-02-28 18:40:20 -05:00
|
|
|
%: %.c
|
|
|
|
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@
|
2011-08-27 17:03:39 -04:00
|
|
|
|
|
|
|
clean:
|
2016-10-09 12:56:52 -04:00
|
|
|
rm -f $(BINARIES) $(SBINS) *.o
|